I have an /etc/eclean/distfiles.exclude file. When there are files to be deleted by `eclean-dist -d` eclean behaves normally. But if there are no files to be deleted, then `eclean-dist -d` throws errors and exits. Reproducible: Always Steps to Reproduce: 1. run `eclean-dist -d`, which finds files and deletes them, then lists the "unavailable" files due to the distfiles.exclude list. 2. run `eclean-dist -d` again. Actual Results: Traceback (most recent call last): File "/usr/bin/eclean-dist", line 44, in <module> main() File "/usr/lib64/python2.7/site-packages/gentoolkit/eclean/cli.py", line 497, in main output=output) File "/usr/lib64/python2.7/site-packages/gentoolkit/eclean/cli.py", line 430, in doAction clean_size = cleaner.pretend_clean(saved) UnboundLocalError: local variable 'cleaner' referenced before assignment Expected Results: It should say it finds no files to delete, then list the unavailable files. Here is the output from two successive runs of eclean-dist; the problem occurs on the second run. $ eclean-dist --nocolor -d >>> Building file list for distfiles cleaning... >>> Cleaning distfiles... [ 9.7 M ] dmathsaddon.oxt [ 80.2 K ] dosfstools-3.0.12.tar.gz [ 539.8 K ] fcron-3.0.6.src.tar.gz [ 287.0 K ] filelight-4.9.3.tar.xz [ 1.4 M ] freetype-2.4.9.tar.bz2 [ 2.0 M ] gwenview-4.9.3.tar.xz [ 21.1 K ] iputils-s20101006-manpages.tar.bz2 [ 92.2 K ] iputils-s20101006.tar.bz2 [ 81.9 K ] kactivities-4.9.3.tar.xz [ 2.0 M ] kate-4.9.3.tar.xz [ 84.8 K ] kcalc-4.9.3.tar.xz [ 83.8 K ] kcharselect-4.9.3.tar.xz [ 2.4 M ] kde-baseapps-4.9.3.tar.xz [ 6.0 M ] kde-runtime-4.9.3.tar.xz [ 21.3 M ] kde-workspace-4.9.3.tar.xz [ 1.1 M ] kdeadmin-4.9.3.tar.xz [ 132.8 M ] kdeartwork-4.9.3.tar.xz [ 49.6 M ] kdegames-4.9.3.tar.xz [ 39.0 K ] kdegraphics-strigi-analyzer-4.9.3.tar.xz [ 40.3 K ] kdegraphics-thumbnailers-4.9.3.tar.xz [ 11.2 M ] kdelibs-4.9.3.tar.xz [ 8.5 M ] kdenetwork-4.9.3.tar.xz [ 13.7 M ] kdepim-4.9.3.tar.xz [ 1.1 M ] kdepim-runtime-4.9.3.tar.xz [ 2.5 M ] kdepimlibs-4.9.3.tar.xz [ 1.7 M ] kdeplasma-addons-4.9.3.tar.xz [ 2.4 M ] kdewebdev-4.9.3.tar.xz [ 294.1 K ] kmix-4.9.3.tar.xz [ 423.9 K ] konsole-4.9.3.tar.xz [ 91.0 K ] kscd-4.9.3.tar.xz [ 256.3 K ] ksnapshot-4.9.3.tar.xz [ 273.6 K ] kwallet-4.9.3.tar.xz [ 153.0 K ] libkcddb-4.9.3.tar.xz [ 73.8 K ] libkcompactdisc-4.9.3.tar.xz [ 261.2 K ] libkdcraw-4.9.3.tar.xz [ 129.6 K ] libkexiv2-4.9.3.tar.xz [ 73.8 K ] libkipi-4.9.3.tar.xz [ 497.2 K ] libmirage-1.5.0.tar.bz2 [ 73.6 M ] linux-3.1.tar.bz2 [ 26.5 K ] mplayerthumbs-4.9.3.tar.xz [ 369.4 K ] nepomuk-core-4.9.3.tar.xz [ 1.3 M ] okular-4.9.3.tar.xz [ 1.9 M ] pykde4-4.9.3.tar.xz [ 62.4 K ] python-exec-0.1.1.tar.bz2 [ 3.6 M ] rekonq-1.2.tar.bz2 [ 8.8 K ] svgpart-4.9.3.tar.xz [ 522.9 K ] taglib-1.7.2.tar.gz [ 394.4 K ] upower-0.9.18.tar.xz [ 14.9 K ] vhba-module-20120422.tar.bz2 [ 311.8 K ] yakuake-2.9.8.tar.bz2 =========== [ 355.4 M ] Total space from 50 files were freed in the distfiles directory The following unavailable files were saved from cleaning due to exclusion file entries [ 1.8 M ] dbus-1.6.2.tar.gz [ 151.9 K ] debianutils_3.4.4.tar.gz [ 490.1 K ] eix-0.26.4.tar.xz [ 43.0 K ] euses-2.5.8.tar.bz2 [ 9.7 K ] firefox-17.0-patches-0.1.tar.xz [ 51.4 K ] firefox-18.0-patches-0.5.tar.xz [ 92.5 M ] firefox-18.0.source.tar.bz2 [ 20.0 K ] gcc-4.6.3-patches-1.9.tar.bz2 [ 3.0 M ] gentoolkit-0.3.0.5.tar.gz [ 177.8 K ] help2man-1.40.8.tar.gz [ 365.7 K ] hwids-20121119.tar.gz [ 3.3 M ] libarchive-3.0.3.tar.gz [ 161.1 K ] lm_sensors-3.2.0.tar.bz2 [ 23.8 M ] mariadb-5.1.62.tar.gz [ 345.7 K ] mlocate-0.24.tar.xz [ 170.8 K ] openrc-0.11.6.tar.bz2 [ 1.1 M ] openssh-5.8p1.tar.gz [ 313.1 K ] pciutils-3.1.7.tar.gz [ 824.6 K ] portage-2.1.11.9.tar.bz2 =========== [ 128.6 M ] Total space from 19 package files Re-run the last command with the -D option to clean them as well $ eclean-dist --nocolor -pd >>> Building file list for distfiles cleaning... >>> Your distfiles directory was already clean. The following unavailable files were saved from cleaning due to exclusion file entries Traceback (most recent call last): File "/usr/bin/eclean-dist", line 44, in <module> main() File "/usr/lib64/python2.7/site-packages/gentoolkit/eclean/cli.py", line 497, in main output=output) File "/usr/lib64/python2.7/site-packages/gentoolkit/eclean/cli.py", line 430, in doAction clean_size = cleaner.pretend_clean(saved) UnboundLocalError: local variable 'cleaner' referenced before assignment
And here's my /etc/eclean/distfiles.exclude I'm not sure what more info might be helful. # /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 ## categories to keep sys-apps app-arch app-backup app-portage ## packages to keep dev-libs/openssl sys-devel/binutils app-shells/bash dev-db/mariadb net-misc/openssh sys-devel/gcc www-client/firefox dev-libs/nspr dev-libs/nss