summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-25 13:55:46 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-25 13:55:46 -0700
commitf22d13e4ecfb472b0bfc20f19bd40c8fc4603f74 (patch)
tree518d41609b6d9896b04b8f5a7c2e57d8c947c87e
parente5eaa26b7ff920465ee438692e825214f29fa06b (diff)
downloadportage-f22d13e4ecfb472b0bfc20f19bd40c8fc4603f74.tar.gz
portage-f22d13e4ecfb472b0bfc20f19bd40c8fc4603f74.tar.bz2
portage-f22d13e4ecfb472b0bfc20f19bd40c8fc4603f74.zip
Fix BinpkgVerifier so that it doesn't try to rename the file if
it doesn't exist.
-rw-r--r--pym/_emerge/BinpkgVerifier.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/_emerge/BinpkgVerifier.py b/pym/_emerge/BinpkgVerifier.py
index ab3191361..ed4fc1f74 100644
--- a/pym/_emerge/BinpkgVerifier.py
+++ b/pym/_emerge/BinpkgVerifier.py
@@ -27,6 +27,7 @@ class BinpkgVerifier(AsynchronousTask):
stdout_orig = sys.stdout
stderr_orig = sys.stderr
out = portage.StringIO()
+ file_exists = True
try:
sys.stdout = out
sys.stderr = out
@@ -36,6 +37,7 @@ class BinpkgVerifier(AsynchronousTask):
writemsg("!!! Fetching Binary failed " + \
"for '%s'\n" % pkg.cpv, noiselevel=-1)
rval = 1
+ file_exists = False
except portage.exception.DigestException as e:
writemsg("\n!!! Digest verification failed:\n",
noiselevel=-1)
@@ -56,7 +58,7 @@ class BinpkgVerifier(AsynchronousTask):
os.unlink(self.logfile)
except OSError:
pass
- else:
+ elif file_exists:
pkg_path = bintree.getname(pkg.cpv)
head, tail = os.path.split(pkg_path)
temp_filename = _checksum_failure_temp_file(head, tail)