Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2007 16:44:16 +0200
From:      des@des.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=)
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src Makefile.inc1
Message-ID:  <86wszbqxbz.fsf@dwp.des.no>
In-Reply-To: <20070514154040.0lofzrgm8kskgog4@webmail.leidinger.net> (Alexander Leidinger's message of "Mon\, 14 May 2007 15\:40\:40 %2B0200")
References:  <200705131815.l4DIFop9026874@repoman.freebsd.org> <20070514154040.0lofzrgm8kskgog4@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Leidinger <Alexander@Leidinger.net> writes:
> Dag-Erling Smorgrav <des@FreeBSD.org> 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



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