pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How can I delete obsolete distfiles and local binary packages recursively?



Ottavio Caruso <ottavio2006-usenet2012%yahoo.com@localhost> writes:

> Hi list,
>
> I have this in my mk.conf:
>
> DISTDIR?= /home/oc/pkgsrc/distfiles
> PACKAGES?= /home/oc/pkgsrc/packages
>
> (NB: ~/pkgsrc is the parent directory to the two local clones
> pkgsrc-current  and pkgsrc-stable:
>
> $ ls pkgsrc/
> distfiles  packages  pkgsrc-current  pkgsrc-stable  work)
>
> These two directories ($DISTDIR, $PACKAGES) are consequently growing
> in size. Old distfiles and binary packages exist there, that I will
> most likely never use in the future.
>
> Is there a way to delete both distfiles and binary packages that are
> not relevant to my current setup? I've checked in the guide and the
> wiki, but haven't found an answer.
>
> I guess I could start pruning these files in order of creation, or
> maybe any time a new stable release comes out, but I wonder if doing
> so could possibly break things later on.

As Adam says, look at lintpkgsrc.  It is pretty sensible to share
distfiles, but beware that lintpkgsrc run in one tree will remove
distfiles that are not referenced *from that tree*.

Sharing the packages directory between stable and head is not a good
idea, I think.  While packages more or less always should and more or
less almost always do have different versions if they have been updated,
there are also changes from mk/ changes, dependencies, etc. and I think
it's best to avoid mixing them.  Also, lintpkgsrc has an option to
remove packages that are not installed and out of date.  But that's
relative to a single pkgsrc tree.

So my advice is to use PACKAGES as a separate place for each tree.

For DISTDIR, what I think you really want is a separate dir, with a
pre-fetch hook to link instead of fetch again.   But that's a bunch of
code ot write probably.


Home | Main Index | Thread Index | Old Index