hi, i'm submiting a new ebuild, for a new program, that let us implementes differents polices to clean /usr/portage/distfiles. Regards, Juan. ---8<----distcleaner-0.0.1.build---------8<-------------------------------- # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="discleaner implements differents policies to clean /usr/portage/distdir" HOMEPAGE="http://www.leak.com.ar/~juam/code/distcleaner/" SRC_URI=http://www.leak.com.ar/~juam/code/distcleaner/releases/${P}.tar.bz2 LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND=">=app-portage/gentoolkit-0.2.0_pre8" src_install() { dobin ${WORKDIR}/${PN}/${PN} || die dodoc ${WORKDIR}/${PN}/AUTHORS ${WORKDIR}/${PN}/doc/README ${WORKDIR}/${PN}/TODO } ---8<----distcleaner-0.0.1.build---------8<--------------------------------
One comment so far, it gives errors about not being able to find ebuilds for installed packages, but they can be found elsewhere. For example. !!! aux_get(): ebuild for 'sys-libs/db-3.2.9-r2' does not exist at: !!! /usr/portage/sys-libs/db/db-3.2.9-r2.ebuild but, that ebuild can be found at: /var/db/pkg/sys-libs/db-3.2.9-r2/db-3.2.9-r2.ebuild but now that I'm looking at it, that looks strangely like a portage problem
That is right. I reported that earlier to the portage team: http://bugs.gentoo.org/show_bug.cgi?id=47190 It isn't a big problem for the not_installed policy, because, if you don't have the ebuild file at /usr/portage, you won't be able to rebuild it. But in the other hand is still lives at /var/db/pkg/.
Any chance to incorporate any unique features into eclean ? (bug #33877) We will add one cleaning tool to gentoolkit, haven't really looked at yours yet, but if they are not too different feature-wise I'd rather add eclean.
To be sincere, first i wrote the code, and then I started to see others alternatives. I've been looking the bug #33877, and the feature that distcleaner adds, is the reusability: There are lots of ways to delete the contents of the directory. You may want to remove the small files, the ones that are not needed to rebuild the system, ... In distcleaner, you can extend a class, overwrite a method, and then you have a new policy. It's very simple (thanks to OOP)! A missing feature is the cleanning of the packages dir, and the use of the DISTDIR of /etc/make.conf (trivial to add). Regards, Juan.
I have a suggestion for a new policy on what to delete. Only keep the files for the latest stable ebuild. And if ACCEPT_KEYWORDS is set, only keep the files for the latest ~arch marked ebuild. Let's called this new policy 'old_sources'. And how about yet another policy which mixes 'not_installed' and 'old_sources', that would delete files which are not installed and are not needed since newer ebuilds exist, but would not delete files that belong to the most current ebuild even if it's not installed. Can you add these two?
*** Bug 49031 has been marked as a duplicate of this bug. ***
This is "fixed" now eclean is in gentoolkit?
Indeed...