Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 1999 10:19:26 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
To:        freebsd-current@FreeBSD.ORG
Subject:   Re: optional 'make release' speed-up patch
Message-ID:  <199909121719.KAA31132@gndrsh.dnsmgr.net>
In-Reply-To: <199909121358.PAA15778@dorifer.heim3.tu-clausthal.de> from Oliver Fromme at "Sep 12, 1999 03:58:01 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
> Matthew Thyer wrote in list.freebsd-current:
>  > YES please fix this ridiculous inefficiency pointed out by Rod!
> 
> There's nothing broken, so there's nothing to fix (IMO).
> 
>  > The current method of cleaning the build tree is to chflags -R and
>  > then rm -r which results in two full traversals of the entire /usr/obj
>  > tree which takes MUCH longer than attempting an rm -r first followed by
>  > a chflags -R and another rm -r.
> 
> Uhm, what are you talking about?  The Makefile does exactly
> that:
> 
> <quote>
> # The first command will fail on a handful of files that have their schg
> # flags set.  But it greatly speeds up the next two commands.
>         -rm -rf ${CHROOTDIR}
>         -chflags -R noschg ${CHROOTDIR}/.
                                          ^(sic)
>         -rm -rf ${CHROOTDIR}
> </quote>

My original message is not quoted enough in detail here to see the
difference.  But there is a difference:

	CHROOTDIR == /usr/obj/${.CURDIR}/tmp != /usr/obj/${.CURDIR}

The above sub-optimization only rapidly deletes the chroot tool dir, aka
/usr/obj/${.CURDIR}/tmp, not /usr/obj/${.CURDIR}.

This is the second person to make this mistake, so don't feel bad.  

Another side effect of my ``fix'' is it restores the intended behavior
by the original author of ``make cleandir''.  The current code will
leave things behind in /usr/obj if a node of the tree is removed as
it depends on the tree traversal to clean things up, and if the node
is no longer traversed into it will remain in /usr/obj/ until someone
manually cleans it out.

-- 
Rod Grimes - KD7CAX - (RWG25)                    rgrimes@gndrsh.dnsmgr.net


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909121719.KAA31132>