From owner-cvs-all@FreeBSD.ORG Mon May 14 15:30:01 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B36D16A404; Mon, 14 May 2007 15:30:01 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id B687813C483; Mon, 14 May 2007 15:30:00 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54a5d654.dip.t-dialin.net [84.165.214.84]) by redbull.bpaserver.net (Postfix) with ESMTP id E54632E09C; Mon, 14 May 2007 17:29:54 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 1A5DE5B48A3; Mon, 14 May 2007 17:29:39 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id l4EFTcKI098447; Mon, 14 May 2007 17:29:38 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Mon, 14 May 2007 17:29:38 +0200 Message-ID: <20070514172938.5v4yi78kisokk84s@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 14 May 2007 17:29:38 +0200 From: Alexander Leidinger To: Dag-Erling =?utf-8?b?U23Dg8K4cmdyYXY=?= References: <200705131815.l4DIFop9026874@repoman.freebsd.org> <20070514154040.0lofzrgm8kskgog4@webmail.leidinger.net> <86wszbqxbz.fsf@dwp.des.no> In-Reply-To: <86wszbqxbz.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.564, required 8, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14, MIME_8BIT_HEADER 0.30) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src Makefile.inc1 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 15:30:01 -0000 Quoting Dag-Erling Sm=C3=83=C2=B8rgrav (from Mon, 14 May 2007 = =20 16:44:16 +0200): > Alexander Leidinger writes: >> Dag-Erling Smorgrav writes: >> > Log: >> > Greatly speed up {check,delete}-old* by replacing make loops =20 >> with sh loops. >> How much faster? > > A *lot* faster. Makefile loops are extremely slow. The speedup was so > great that I didn't even bother measuring it. Thanks for the short evaluation in the other mail. It's a very nice =20 speedup. I didn't expect the for-loop in make to be that slow compared =20 to a shell for-loop. >> Some review: >> >> Why did you remove the echo? > > which echo? about schg? it was completely bogus. Yes. I don't think so, please explain. > feel free to re-add it, but only if you also add logic to check whether > the file actually has the schg flag set before running chflags. In the current code it doesn't make sense, and the wording can be =20 changed to tell that it will remove schg, in case this flag is set. As =20 you did the change and I don't have time to commit such a change when =20 I'm back at home (the place where I can make commits), would you =20 please add the echo again? >> Why do you redirect stderr of chflags to /dev/null? > > because chflags will complain if your /usr is on a file system which > does not support flags, such as NFS or ZFS. But it also removes any other failure message. A more sensible =20 approach would be to replace the redirection with a "grep -v". >> Why did you change the removal logic? > > because it was broken; it would always ask twice about files which you > chose not to delete. Yes, that's the bug I talked about. But it also did not try the =20 chflags if it was able to delete the file. So the bug is not that =20 chflags prints the message on a FS which does not supports flags, the =20 bug is that the chflags is done when the user doesn't want to remove =20 the file. See below. >> The way it was before: >> - rm (without -i if requested) >> - if rm fails do a chflags and rm again (bug: if user says no in the >> interactive mode, the chlags is done regardless) >> - tell the user about the stuff we do (removing flags) >> - it aborts on a failure of the second rm (AFAIR) >> >> The way it is now: >> - for every file do a chflags without notifying the user, don't tell >> about problems >> - rm (without -i if requested) >> - bug(?): ${DESTDIR} in the rm line > > no, this is intentional, and in fact the original code had it too. The original code hat it before, but you CD into DESTDIR, so it is not =20 necessary anymore. This may be cosmetics to you, but I did ask myself =20 "Why does des use DESTDIR here?". Sorry that I used "bug", I should =20 have used "overlooked" or something like this. Removing the =20 unnecessary DESTDIR helps other people understand this better. >> - doesn't abort on rm failure > > that was not intentional... I forgot to remove the || true. > >> - has the same bug that it chflags even if the user doesn't want to >> rm the file > > yes, but at least it doesn't ask twice. That's the bug you should fix, and not the part where you quiten the =20 chflags command. Please fix it the right way, and not by using a workaround. Bye, Alexander. --=20 A hermit is a deserter from the army of humanity. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137