From owner-cvs-src@FreeBSD.ORG Mon May 14 14:44:21 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 574A016A403; Mon, 14 May 2007 14:44:21 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 132B213C458; Mon, 14 May 2007 14:44:21 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 187EA20A7; Mon, 14 May 2007 16:44:17 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 83E9B2088; Mon, 14 May 2007 16:44:16 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 56F8B50D0; Mon, 14 May 2007 16:44:16 +0200 (CEST) From: des@des.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=) To: Alexander Leidinger References: <200705131815.l4DIFop9026874@repoman.freebsd.org> <20070514154040.0lofzrgm8kskgog4@webmail.leidinger.net> Date: Mon, 14 May 2007 16:44:16 +0200 In-Reply-To: <20070514154040.0lofzrgm8kskgog4@webmail.leidinger.net> (Alexander Leidinger's message of "Mon\, 14 May 2007 15\:40\:40 +0200") Message-ID: <86wszbqxbz.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src Makefile.inc1 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 14:44:21 -0000 Alexander Leidinger writes: > Dag-Erling Smorgrav writes: > > Log: > > Greatly speed up {check,delete}-old* by replacing make loops 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. > Some review: > > Why did you remove the echo? which echo? about schg? it was completely bogus. 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. > 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. > Why did you change the removal logic? because it was broken; it would always ask twice about files which you chose not to delete. > 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. > - 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. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no