From owner-freebsd-current Sun Sep 12 10:19:38 1999 Delivered-To: freebsd-current@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id F08AC14CCC for ; Sun, 12 Sep 1999 10:19:29 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id KAA31132 for freebsd-current@FreeBSD.ORG; Sun, 12 Sep 1999 10:19:27 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <199909121719.KAA31132@gndrsh.dnsmgr.net> Subject: Re: optional 'make release' speed-up patch In-Reply-To: <199909121358.PAA15778@dorifer.heim3.tu-clausthal.de> from Oliver Fromme at "Sep 12, 1999 03:58:01 pm" To: freebsd-current@FreeBSD.ORG Date: Sun, 12 Sep 1999 10:19:26 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [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: > > > # 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} > 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