From d213f11d1eeb83186cd5d024aaab2888349c2834 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 2 Mar 2010 22:20:41 +0000 Subject: [PATCH] Remove fetch log after successful fetch. svn path=/main/trunk/; revision=15721 --- pym/_emerge/Binpkg.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py index a8d07630b..4f2a07344 100644 --- a/pym/_emerge/Binpkg.py +++ b/pym/_emerge/Binpkg.py @@ -171,6 +171,14 @@ class Binpkg(CompositeTask): if self._fetched_pkg: self._bintree.inject(pkg.cpv, filename=pkg_path) + logfile = self.settings.get("PORTAGE_LOG_FILE") + if logfile is not None and os.path.isfile(logfile): + # Remove fetch log after successful fetch. + try: + os.unlink(logfile) + except OSError: + pass + if self.opts.fetchonly: self._current_task = None self.returncode = os.EX_OK -- 2.26.2