CFT: New version of portmaster in svn

b. f. bf1783 at googlemail.com
Tue Jul 27 09:55:58 UTC 2010


Doug Barton wrote:
>On Fri, 23 Jul 2010, Douglas Berry wrote:
...
>> With respect to the --clean-* options, my earlier (a long time ago)
>> test with --clean-distfiles showed that valid distfiles would be
>> deleted if the corresponding port was not installed.  I'd like to only
>> delete them if they are no longer valid (similar to portsclean -D).
>
>The problem is that in order to accomplish that portmaster would have to
>check every port in the tree. Assuming 22,000 ports, and that any given
>port is equally likely to fall anywhere in the tree, on average you'd
>have to search 11,000 ports for every distfile that is not related to a
>port installed on that system.
>
>Now what I _could_ do is use the same technique I use in
>--clean-distfiles (create a text file with the distfile information) but
>instead of limiting it to installed ports, do all of them. I have never
>even tested that to see how long it would take, but I suppose I could
>take a look.

I also found it to be a problem that one didn't have the choice of
keeping distfiles that belonged to uninstalled ports, but were not
stale.  Fortunately, besides 'portsclean -D' from
ports-mgmt/portupgrade*, there is also sobomax@'s convenient shell
script,  ports/Tools/scripts/distclean.sh, which fills this niche and
uses only base system utilities.

b.


More information about the freebsd-ports mailing list