removing stale files
Garance A Drosihn
drosih at rpi.edu
Wed Jun 11 14:33:23 PDT 2003
At 2:06 PM -0700 6/11/03, Marcel Moolenaar wrote:
>On Wed, Jun 11, 2003, Garance A Drosihn wrote:
> > Many suggestions amount to removing anything
>> "which looks old", because "if it is old, it must be bad".
>
>That's not a good way to approach it.
Right. That's really the main thing I want to avoid.
> > That means you're removing files when you don't really know
>> what they contain, or why they're there.
>
>Which is bad, because it means you don't know your own source
>tree.
No, it means that "you" (for some value of "you") do not know
"my" source tree (for every value of "my", == all freebsd users).
> > I'm just saying that a utility with a list of specific files is
>> much less likely to blow off some poor user's foot when they
>> run it.
>
>True. The easiest utility is a a simple for loop as the last
>action of installworld, like:
>
>Index: Makefile.inc1
>===================================================================
>RCS file: /home/ncvs/src/Makefile.inc1,v
>retrieving revision 1.365
>diff -u -r1.365 Makefile.inc1
>--- Makefile.inc1 8 Jun 2003 04:15:05 -0000 1.365
>+++ Makefile.inc1 11 Jun 2003 21:04:41 -0000
>@@ -409,6 +409,12 @@
> done
> cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}
> rm -rf ${INSTALLTMP}
>+.for F in ${STALE_FILES}
>+ rm -f $F
>+.endfor
>+.for D in ${STALE_DIRS}
>+ rmdir $D || true
>+.endfor
>
> #
> # reinstall
Perhaps true, although you'll be surprised at how long that list
of STALE_FILES will get... If you think this is workable, then
try it. I think at this point what we need to do is to get some
actual implementations going, and see how they work in practice.
I'll see if I can dig up the various lists-of-files that I came
up with in my earlier attempt. Well, actually, maybe I shouldn't.
This does not need to be an exhaustive list. It would be fine to
start with just the files we *know* will cause trouble, and go
on from there. I keep trying for the perfect all-encompassing
solution, and that's where I get bogged down...
--
Garance Alistair Drosehn = gad at gilead.netel.rpi.edu
Senior Systems Programmer or gad at freebsd.org
Rensselaer Polytechnic Institute or drosih at rpi.edu
More information about the freebsd-arch
mailing list