Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Nov 2011 22:43:04 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Alexander Best <arundel@freebsd.org>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: make cleanworld
Message-ID:  <4EB9A268.5020805@FreeBSD.org>
In-Reply-To: <20111108204912.GA34155@freebsd.org>
References:  <20111108204912.GA34155@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2011-11-08 21:49, Alexander Best wrote:
> any reason 'make cleanworld' does
> 
> otaku% make cleanworld
> rm -rf /usr/obj/usr/git-freebsd-head/*
> chflags -R 0 /usr/obj/usr/git-freebsd-head
> rm -rf /usr/obj/usr/git-freebsd-head/*
> 
> where
> 
> otaku% make cleanworld
> chflags -R 0 /usr/obj/usr/git-freebsd-head
> rm -rf /usr/obj/usr/git-freebsd-head/*
> 
> should be sufficient?

The first method is more efficient, because there are usually just a few
files with schg flags set on them (zero even, if you build as a regular
user).

Suppose you have 30,000 files in /usr/obj, of which 20 have schg flags.

The first method will unlink 29,980 files, failing on 20 of them.  Then
it will change flags on just 20 files, and lastly unlink those 20 files.
Total number of 'operations' is 30,000 + 20 + 20 = 30,040.

The second method will change flags on all 30,000 files, then unlink all
30,000 files.  Total number of 'operations' is now 30,000 + 30,000 =
60,000.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EB9A268.5020805>