Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163588 - app-portage/gentoolkit-0.2.3_pre3: eclean-dist does not clean enough
Summary: app-portage/gentoolkit-0.2.3_pre3: eclean-dist does not clean enough
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-24 13:10 UTC by Martin von Gagern
Modified: 2007-01-28 22:59 UTC (History)
0 users

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


Attachments
Add debug statements to eclean (eclean.debug.patch,1.17 KB, patch)
2007-01-25 04:21 UTC, Paul Varner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2007-01-24 13:10:28 UTC
I've just run eclean-dist without any arguments on a system with freshly synced portage tree. Still, after cleaning, I found several files without matching ebuilds, e.g.:
thunderbird-1.5.0.4-source.tar.bz2
thunderbird-1.5.0.5-source.tar.bz2
thunderbird-1.5.0.7-source.tar.bz2
mozilla-1.7.12-source.tar.bz2
and probably many many more.

How come these old sources are still around after cleaning?
How can I help finding out what's going on?

I believe I encountered similar problems the other day when using the -d flag. But I've been impatient then and simply wiped out all distfiles, so I don't have any details from that.
Comment 1 Paul Varner (RETIRED) gentoo-dev 2007-01-25 04:21:22 UTC
Created attachment 108080 [details, diff]
Add debug statements to eclean

This patch adds debug statements to eclean.  The easiest way to use it is to do the following (Assuming that you save attachment as /tmp/eclean.debug.patch):

cd <some temporary directory>
cp /usr/bin/eclean .
patch < /tmp/eclean.debug.patch
./eclean <Your normal eclean options> distfiles 2>eclean.out
sort -u eclean.out -o eclean.out

The output will contain a list of all distfiles that are being kept preceded by a reason.  The reasons are:

Time - You used the -t option and the file meets the criteria
Size - You used the -s option and the file meets the criteria
Exclusion - The file is listed in /etc/eclean/distfiles.exclude
category/package - The file is owned by the indicated package
Comment 2 Martin von Gagern 2007-01-28 22:59:35 UTC
(In reply to comment #1)

OK, I tried your patch, and found that for all my suspicions there was a valid reason why things should stay around that I hadn't thought of before.

For the mentioned files that was enigmail and gecko-sdk using older mozilla sources. For many others it was exotic kernels and stuff like that.

Sorry for the noise, and thank's for the patch!
I guess I'll keep that around anyway, in might be useful for manual cleaning.

I could even imagine an interactive feature combining for each source file the list of ebuilds that would use it, along with the eix output for each, to see what versions there are of that, which are installed, and so on. Just a thought, but I guess if there was such a thing I might use it.

Maybe I really should get started learning python...