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?

On Mon, 10 Jun 2019 at 13:05, Greg Troxel <> wrote:

> 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.

Yes, I know. Sharing directories is not a clean solution. At the
moment I'm just experimenting to find my feet. I started using
-stable, then I had to move to -current.

> 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.

How would I do that? Is there a script around that I can use?

Incidentally, I've found this in defaults/mk.conf:

#DIST_PATH= /cdrom/0/distfiles:${HOME}/distfiles
# Colon-delimited list of directories in which to search for
# ${DISTFILES} and ${PATCHFILES}.  If the requested file is not in any
# of the directories in ${DIST_PATH}, it will be downloaded into
# ${DISTDIR}.  If the requested file is in one of the directories in
# ${DIST_PATH}, a symbolic link will be made to it from ${DISTDIR}.
# ${DIST_PATH} directories will will be searched before ${DISTDIR},
# letting a CD hold the main distfiles archive, and local ${DISTDIR}
# hold any updated distfiles, for example.
# Possible:  any directories
# Default: none

Would this variable help?

Ottavio Caruso

Home | Main Index | Thread Index | Old Index