Discussion:
svn commit: r227769 - head
Glen Barber
2011-11-20 19:05:32 UTC
Permalink
Author: gjb (doc committer)
Date: Sun Nov 20 19:05:32 2011
New Revision: 227769
URL: http://svn.freebsd.org/changeset/base/227769

Log:
Add a note to src/Makefile that explains that 'rm' runs twice because the
second invocation only needs to operate on files with the immutable flag
set.

Submitted by: arundel (via private email) (original version)
Discussed on: -toolchain@
MFC after: 3 days

Modified:
head/Makefile

Modified: head/Makefile
==============================================================================
--- head/Makefile Sun Nov 20 18:01:45 2011 (r227768)
+++ head/Makefile Sun Nov 20 19:05:32 2011 (r227769)
@@ -185,7 +185,10 @@ buildworld: upgrade_checks
# files with chflags set, so this unsets them and tries the 'rm' a
# second time. There are situations where this target will be cleaning
# some directories via more than one method, but that duplication is
-# needed to correctly handle all the possible situations.
+# needed to correctly handle all the possible situations. Removing all
+# files without the immutable flag set in the first 'rm' instance saves
+# time, because 'chflags' will need to operate on fewer files (with the
+# immutable flag set) afterwards.
#
BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
cleanworld:
Alexander Best
2011-11-20 19:16:21 UTC
Permalink
Post by Glen Barber
Author: gjb (doc committer)
Date: Sun Nov 20 19:05:32 2011
New Revision: 227769
URL: http://svn.freebsd.org/changeset/base/227769
Add a note to src/Makefile that explains that 'rm' runs twice because the
second invocation only needs to operate on files with the immutable flag
thanks for taking care of this one. :)

are we sure we're only dealing with the immutable flag? since chflags is being
invoked as 'chflags -R 0' and not 'chflags -R noschg', wouldn't it be better to
refer to "file flags" in general and not only to the "immutable flag"?

cheers.
alex
Post by Glen Barber
set.
Submitted by: arundel (via private email) (original version)
MFC after: 3 days
head/Makefile
Modified: head/Makefile
==============================================================================
--- head/Makefile Sun Nov 20 18:01:45 2011 (r227768)
+++ head/Makefile Sun Nov 20 19:05:32 2011 (r227769)
@@ -185,7 +185,10 @@ buildworld: upgrade_checks
# files with chflags set, so this unsets them and tries the 'rm' a
# second time. There are situations where this target will be cleaning
# some directories via more than one method, but that duplication is
-# needed to correctly handle all the possible situations.
+# needed to correctly handle all the possible situations. Removing all
+# files without the immutable flag set in the first 'rm' instance saves
+# time, because 'chflags' will need to operate on fewer files (with the
+# immutable flag set) afterwards.
#
BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
Glen Barber
2011-11-20 19:29:50 UTC
Permalink
Post by Alexander Best
Post by Glen Barber
Author: gjb (doc committer)
Date: Sun Nov 20 19:05:32 2011
New Revision: 227769
URL: http://svn.freebsd.org/changeset/base/227769
Add a note to src/Makefile that explains that 'rm' runs twice because the
second invocation only needs to operate on files with the immutable flag
thanks for taking care of this one. :)
are we sure we're only dealing with the immutable flag? since chflags is being
invoked as 'chflags -R 0' and not 'chflags -R noschg', wouldn't it be better to
refer to "file flags" in general and not only to the "immutable flag"?
You are correct, I didn't think about the 'undeletable' flag. I've
committed a followup with 227770.

Thanks.

Glen
--
Glen Barber | ***@FreeBSD.org
FreeBSD Documentation Project
Loading...