summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-08 18:25:39 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-08 18:25:39 +0000
commit2b9fc8209f26f4de740d72207cc15accf6766f63 (patch)
treeab7b17e1d052c0217fe6ab597814248ed7737550
parent25cb16c01248eba08c9cf615d5460fb269a74b18 (diff)
downloadportage-2b9fc8209f26f4de740d72207cc15accf6766f63.tar.gz
portage-2b9fc8209f26f4de740d72207cc15accf6766f63.tar.bz2
portage-2b9fc8209f26f4de740d72207cc15accf6766f63.zip
In EbuildBuild._fetch_exit(), clean up the fetch log if fetch was successful.
svn path=/main/trunk/; revision=11658
-rw-r--r--pym/_emerge/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index ba28b9f5a..24dc51bd5 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -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