Make dyn_clean ignore FEATURES=keepwork when [[ $EMERGE_FROM = binary ]]
authorZac Medico <zmedico@gentoo.org>
Thu, 12 Mar 2009 05:57:07 +0000 (05:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 12 Mar 2009 05:57:07 +0000 (05:57 -0000)
and remove shutil.rmtree() call from Binpkg._clean_exit() since dyn_clean
is guaranteed to do a full clean now. (trunk r13069)

svn path=/main/branches/2.1.6/; revision=13083

bin/ebuild.sh
pym/_emerge/__init__.py

index 23f1c447f7fdd446579a2c17645ed3771bcd3d71..b75dfc098b15b49e888aaea9031e85da07150535 100755 (executable)
@@ -712,11 +712,12 @@ dyn_clean() {
        rm -rf "${PORTAGE_BUILDDIR}/image" "${PORTAGE_BUILDDIR}/homedir"
        rm -f "${PORTAGE_BUILDDIR}/.installed"
 
-       if ! hasq keeptemp $FEATURES && ! hasq keepwork $FEATURES ; then
+       if [[ $EMERGE_FROM = binary ]] || \
+               ! hasq keeptemp $FEATURES && ! hasq keepwork $FEATURES ; then
                rm -rf "${T}"
        fi
 
-       if ! hasq keepwork $FEATURES; then
+       if [[ $EMERGE_FROM = binary ]] || ! hasq keepwork $FEATURES; then
                rm -f "$PORTAGE_BUILDDIR"/.{exit_status,logid,unpacked,prepared} \
                        "$PORTAGE_BUILDDIR"/.{configured,compiled,tested,packaged}
 
index 6cc58c71b3db7e57d5709c56c579b0e3289c0d4c..345fe8c45f2eec6a17a1c8a4802f4cbb43589d1a 100644 (file)
@@ -3491,13 +3491,6 @@ class Binpkg(CompositeTask):
 
                dir_path = self._build_dir.dir_path
 
-               try:
-                       shutil.rmtree(dir_path)
-               except (IOError, OSError), e:
-                       if e.errno != errno.ENOENT:
-                               raise
-                       del e
-
                infloc = self._infloc
                pkg = self.pkg
                pkg_path = self._pkg_path