Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47779 - ebuild for distcleaner
Summary: ebuild for distcleaner
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-13 18:26 UTC by Juan F. Codagnone
Modified: 2006-07-12 12:42 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juan F. Codagnone 2004-04-13 18:26:15 UTC
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<--------------------------------
Comment 1 Brian Jackson (RETIRED) gentoo-dev 2004-04-22 23:27:16 UTC
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
Comment 2 Juan F. Codagnone 2004-04-23 06:03:51 UTC
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/.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-04-23 12:18:46 UTC
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.
Comment 4 Juan F. Codagnone 2004-04-23 17:58:37 UTC
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.
Comment 5 alex f 2004-04-26 07:37:39 UTC
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?
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-17 20:11:18 UTC
*** Bug 49031 has been marked as a duplicate of this bug. ***
Comment 7 Tristan Heaven (RETIRED) gentoo-dev 2006-07-12 12:31:08 UTC
This is "fixed" now eclean is in gentoolkit?
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-07-12 12:42:05 UTC
Indeed...