From: Zac Medico Date: Sat, 10 Oct 2009 19:20:16 +0000 (-0000) Subject: Discard the log on success, since otherwise we'll have multiple log files for X-Git-Tag: v2.1.7~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=278981d337426529ad9a5ea1d8e0032f79410a6b;p=portage.git Discard the log on success, since otherwise we'll have multiple log files for the same package. (trunk r14559) svn path=/main/branches/2.1.7/; revision=14560 --- diff --git a/pym/_emerge/BinpkgVerifier.py b/pym/_emerge/BinpkgVerifier.py index 404becf09..d36958717 100644 --- a/pym/_emerge/BinpkgVerifier.py +++ b/pym/_emerge/BinpkgVerifier.py @@ -54,7 +54,15 @@ class BinpkgVerifier(AsynchronousTask): writemsg("!!! Expected: %s\n" % e.value[3], noiselevel=-1) rval = 1 - if rval != os.EX_OK: + if rval == os.EX_OK: + # If this was successful, discard the log here since otherwise + # we'll get multiple logs for the same package. + if log_file is not None: + try: + os.unlink(self.logfile) + except OSError: + pass + else: pkg_path = bintree.getname(pkg.cpv) head, tail = os.path.split(pkg_path) temp_filename = portage._checksum_failure_temp_file(head, tail)