Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541842 - app-portage/gentoolkit-0.3.0.9-r2: eclean doesn't remove distfiles from uninstalled packages
Summary: app-portage/gentoolkit-0.3.0.9-r2: eclean doesn't remove distfiles from unins...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-01 21:03 UTC by Toralf Förster
Modified: 2016-06-23 22:11 UTC (History)
0 users

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 Toralf Förster gentoo-dev 2015-03-01 21:03:53 UTC
tor-relay /var/log # eix -I lynis
No matches found.

tor-relay /var/log # eclean distfiles                         
 * Building file list for distfiles cleaning...
 * Cleaning distfiles...
 [    2.7 M ] curl-7.36.0.tar.bz2
 [    3.0 M ] curl-7.37.1.tar.bz2
 [    1.8 M ] dbus-1.8.10.tar.gz
 [    8.5 K ] eselect-emacs-1.16.tar.xz
 [    6.7 M ] glib-2.40.0.tar.xz
 [   89.2 K ] gradm-3.0-201407222118.tar.gz
 [  418.5 K ] pinentry-0.8.2.tar.bz2
 [  113.8 K ] xmlto-0.0.25.tar.bz2
 ===========
 [   14.8 M ] Total space from 8 files were freed in the distfiles directory


tor-relay /var/log # l /var/lib/distfiles/*lynis*
/var/lib/distfiles/lynis-1.3.0.tar.gz  /var/lib/distfiles/lynis-1.6.4.tar.gz
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2015-03-03 04:17:32 UTC
Please include the output of equery l lynis just in case eix's db is not correct.  equery is a live system search.

Also, please post the contents of all /etc/eclean/*  files.
Comment 2 Toralf Förster gentoo-dev 2015-03-03 16:43:07 UTC
(In reply to Brian Dolbec from comment #1)
> Please include the output of equery l lynis just in case eix's db is not
> correct.  equery is a live system search.
> 
> Also, please post the contents of all /etc/eclean/*  files.

tor-relay /mnt/qa/tinderbox # equery l lynis
 * Searching for lynis ...
!!! No installed packages matching 'lynis'

tor-relay /mnt/qa/tinderbox # ls -l /var/lib/distfiles/*lynis*
-rw-rw-r-- 1 portage portage 119797 Dec 25  2011 /var/lib/distfiles/lynis-1.3.0.tar.gz
-rw-rw-r-- 1 portage portage 169854 Oct 14 10:59 /var/lib/distfiles/lynis-1.6.3.tar.gz
-rw-rw-r-- 1 portage portage 171953 Nov  4 14:34 /var/lib/distfiles/lynis-1.6.4.tar.gz

tor-relay /mnt/qa/tinderbox # tail -n 100 -v /etc/eclean/* 
==> /etc/eclean/distfiles.exclude <==
# /etc/eclean/distfiles.exclude
# In this file you can list some categories or cat/pkg-name for which you want
# to protect distfiles from "ecleaning". You can also name some specific files.
# See `man eclean` for syntax details.
metadata.dtd

==> /etc/eclean/packages.exclude <==
# /etc/eclean/packages.exclude
# In this file you can list some categories or cat/pkg-name for which you want
# to protect binary packages from "ecleaning".
# See `man eclean` for syntax details.
Comment 3 Brian Dolbec (RETIRED) gentoo-dev 2015-03-03 16:59:24 UTC
Thank you for posting that.

This is strange, because, by default,  all files are subject for cleaning and only saved by installed pkgs SRC_URI matches and the rules configured for saving them.

I'll look at the code again for a bit, then get back to you.  It has been quite some time since I last made any changes to it.  I need a refresher. ;)
Comment 4 Paul Varner (RETIRED) gentoo-dev 2016-06-23 22:11:14 UTC
eclean is working as designed. Without the -d option, it will only delete distfiles that are not owned by an installed package or any ebuild in the tree.

If you use -d it will delete all distfiles that are not owned by a currently installed package.  If you add -n it will additionally keep distfiles for all versions that match an installed package.

In summary to get the behavior you want, you need to use the -d option.

Feel free to reopen as an enhancement if there is something the the -d and -n options don't handle that you feel it should.