Subject: pkg/28761: make clean CLEANDEPENDS=YES cleans too much...
To: None <email@example.com, firstname.lastname@example.org,>
From: None <kre@munnari.OZ.AU>
Date: 12/23/2004 11:51:00
>Synopsis: make clean CLEANDEPENDS=YES cleans too much...
>Arrival-Date: Thu Dec 23 11:51:00 +0000 2004
>Originator: Robert Elz
>Release: NetBSD 1.6X (pkgsrc -current as of date/time of this message)
Prince of Songkla University
Irrelevant information folloes...
System: NetBSD jade.coe.psu.ac.th 1.6X NetBSD 1.6X (JADE) #17: Wed Sep 24 20:25:35 ICT 2003 email@example.com:/usr/src/real-sys/arch/i386/compile/JADE i386
make clean CLEANDEPENDS=YES
after building/installing a package ends up running "make clean"
(make clean-depends really) in more packages than it probably
should. (This is a change request, not a bug report..., so
what it "probably should" is clearly open for discussion)
As currently implemented, it cleans every dependency of the
package (in pkgsrc), regardless of whether or not they were
actually used while building the package.
It would probably be more useful (faster, and safer) to only
clean those packages that actually needed to be built in order
to build the package that is being cleaned.
Install some package that lots of other things depend on (anything
that something depends upon is enough, but something important and
low leven is easier to find - like one of the perl versions, or
libpng, or something like that). Install it completely.
Then go to some other package that uses the one that was just
installed as a dependency (any of the p5-* packages should do
is perl was what was selected above). Do
make clean CLEANDEPENDS=yes
(not even necessary to make it to start with) and notice that
it cleans perl (as well as perhaps lots of other stuff).
This is most annoying if you happen to have the base package
in a constructed state while looking for some bug, or doing
some enhancement to the package, when some other package
just decides to clean it.
Cleaning all that was actually dirtied while building a package
should be enough.
Lots more code in bas.pkg.mk I assume ... (what fun!)
Most likely need to keep a record (in WRKDIR I guess)
of which packages were actually built, that is, which were
not found to already be installed, and then clean just those.