Make EbuildFetcher clean up the build dir after failures in fetchonly mode
authorZac Medico <zmedico@gentoo.org>
Tue, 7 Oct 2008 08:52:45 +0000 (08:52 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 7 Oct 2008 08:52:45 +0000 (08:52 -0000)
since the log is in emerge-fetch.log anyway.

svn path=/main/trunk/; revision=11648

pym/_emerge/__init__.py

index 6a92fc9522ed76910729fbd07aa969b708768133..47ad0c68ec91490f329da688f1af51bce247666d 100644 (file)
@@ -2290,7 +2290,7 @@ class EbuildFetcher(SpawnProcess):
                # created by the pkg_nofetch phase.
                if self._build_dir is not None:
                        portage.elog.elog_process(self.pkg.cpv, self._build_dir.settings)
-                       if self.returncode == os.EX_OK:
+                       if self.fetchonly or self.returncode == os.EX_OK:
                                try:
                                        shutil.rmtree(self._build_dir.settings["PORTAGE_BUILDDIR"])
                                except EnvironmentError, e: