From: Zac Medico Date: Tue, 2 Mar 2010 22:29:08 +0000 (-0000) Subject: Remove fetch log after successful fetch. (trunk r15721) X-Git-Tag: v2.1.8~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=65834b621549ce049cd5e4b977a56bdbdddce382;p=portage.git Remove fetch log after successful fetch. (trunk r15721) svn path=/main/branches/2.1.7/; revision=15724 --- 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