Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 166926

Summary: app-portage/gentoolkit: eclean: feature request for removing all files except fetch restricted
Product: Portage Development Reporter: Alexander Huemer <alexander.huemer>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: CONFIRMED ---    
Severity: enhancement CC: eva, radek
Priority: High Keywords: NeedPatch
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alexander Huemer 2007-02-14 23:41:02 UTC
i would like to clean up distfiles completely and leave only files with
fetch-restrictons in there.
"eclean -d distfiles -f" leaves over 100 files in distfiles.
i cannot do that manually by "rm", because fetch-restricted files cannot be excepted that way.
such a option should be very easy to implement, unfortunately i have not enough
python experience to do that on my own.

Reproducible: Always
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-02-15 13:25:24 UTC
> i would like to clean up distfiles completely and leave only files with
> fetch-restrictons in there.

It looks like this got implemented:

$ eclean --help
[...]
 -f, --fetch-restricted   - protect fetch-restricted files (when --destructive)

Is that what you were asking for ?
Comment 2 Alexander Huemer 2013-02-15 14:11:33 UTC
Gilles,

that sounds like the idea I had back then, yes.
My eclean does not have a --fetch-restricted though.
It is from gentoolkit 0.3.0.7, according to the gitweb of gentoolkit there were no commits after that tag.
Where do you get your gentoolkit from?
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-02-15 14:40:55 UTC
I have 0.3.0.7 as well from gentoo-x86, nothing fency :).
Plus I remember using this option months ago (if not years) so it's been there for a while afaik.
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2013-02-15 15:38:45 UTC
Fetch-restricted has been implemented since long before I did the re-write for -0.3.0.

-d, --destructive        - only keep the minimum for a reinstallation

--destructive does not clean out all files like the original request.  It keeps any installed pkgs distfiles.  But only the installed version.  It does not keep a backup version's files.

-f, --fetch-restricted   - protect fetch-restricted files (when --destructive)

Your original post here was using -f, --fetch-restricted in the command example.  So, you had that option all along.  Just re-read the first post.


I believe the original intent was to clean even the installed pkgs distfiles.  So everything except fetch-restricted files.

I am somewhat reluctant to add this feature.  I can envision lots of users mis-understanding and wiping out all their distfiles and complaining loudly. Especially those where bandwidth and data transfer are limited.
Comment 5 Paul Varner (RETIRED) gentoo-dev 2016-06-24 03:54:20 UTC
After talking it over, the tools-portage team will not be doing this enhancement. We do understand the use case of wanting to delete everything except fetch restricted files, however, our resources and time are limited and we don't see very many people wanting this feature. 

If patch is provided or another Gentoo developer wants to write it and put it in the repository, we will take those changes.