In EbuildBuild._fetch_exit(), clean up the fetch log if fetch was successful.
authorZac Medico <zmedico@gentoo.org>
Wed, 8 Oct 2008 18:25:39 +0000 (18:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 8 Oct 2008 18:25:39 +0000 (18:25 -0000)
svn path=/main/trunk/; revision=11658

pym/_emerge/__init__.py

index ba28b9f5a8e51b0ad1f2df5b0eee41c534dc5077..24dc51bd5fbf27ebf749bb2116adfb300f129432 100644 (file)
@@ -2469,6 +2469,13 @@ class EbuildBuild(CompositeTask):
                        os.path.exists(fetcher.logfile):
                        self.settings["PORTAGE_LOG_FILE"] = fetcher.logfile
 
+               if not fetch_failed and fetcher.logfile is not None:
+                       # Fetch was successful, so remove the fetch log.
+                       try:
+                               os.unlink(fetcher.logfile)
+                       except OSError:
+                               pass
+
                if fetch_failed or opts.fetchonly:
                        self.wait()
                        return