Steps to reproduce: 1) make it so that /usr/portage/distfiles does not contain useful files (i.e. that would not be removed by eclean-dist), but contains at least one file. 2) run eclean-dist or eclean-dist --deep 3) observe that /usr/portage/distfiles directory is no longer present This is not a problem for portage itself (it will recreate this directory as needed), but subsequently running eclean-dist or eclean-pkg will give error like !!! /usr/portage/distfiles does not appear to be a directory. !!! Please set DISTDIR to a sane value. !!! (Check your make.conf file and environment). Expected result: eclean-dist does not break subsequent run of eclean-pkg, by either not removing the distfiles directory or by eclean-pkg not generating error out of this. (gentoolkit-0.4.8 seems to have the same problem.)
I can also reproduce this bug with app-portage/gentoolkit-0.5.0.