Is it possible to add the option to pass explicitly the path to the DISTDIR directory (ussually /usr/portage/distfiles). The reason is that if we can pass a path we can use it for local repositories, when using it with http-replicator for instance. It is quite easy to modify the eclean program and I did it for my personal use (just one line), but it would be nice if we just use the distribution's eclean and do not worry about updating.
(In reply to comment #0)
> It is quite easy to modify the eclean program and I did it for my
> personal use (just one line), but it would be nice if we just use the
> distribution's eclean and do not worry about updating.
Please submit your patch!
eclean already respects DISTDIR and PKGDIR in the environment, like so:
$ DISTDIR="/home/michael/foo" eclean-dist
$ export PKGDIR="/home/michael/bar"
Is it really necessary to add a commandline option for this as well?
I am just completing a modular re-write of eclean, including a number of unit-tests. One of the things that I did was to make the different functions get the distdir from it's input parameters. This makes it much easier to test and also makes it possible for it to work on any distfiles or multiple directories in the future with less re-coding.
I will inquire with the pkg maintainer whether to add a cmd line option. On a slightly different approach to your suggestion. I also plan to add a network enabling feature that will work with a NFS shared or http-replicator shared distfiles that will correctly obtain info from the clients to decide what it should clean in the served distfiles. It will make use of a hosts file for the list of clients to access for it's info. It may also be advantageous to put a config option in eclean-net variant for the distfiles location.