summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-10 08:08:18 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-10 08:08:18 +0000
commit409790d27c73251fb1f7dccc264ee155143f191d (patch)
treea4af7685a659211be9e8264a1438f2b8d075de21
parent7e4eba96e95a11805fe080ccaba3fe8f4470afe4 (diff)
downloadportage-409790d27c73251fb1f7dccc264ee155143f191d.tar.gz
portage-409790d27c73251fb1f7dccc264ee155143f191d.tar.bz2
portage-409790d27c73251fb1f7dccc264ee155143f191d.zip
Make BinpkgVerifier rename files that fail verification, similar to how
distfiles are automatically renamed. svn path=/main/trunk/; revision=12197
-rw-r--r--pym/_emerge/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 4d864d6ca..44107ee20 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -3524,6 +3524,12 @@ class BinpkgVerifier(AsynchronousTask):
writemsg("!!! Expected: %s\n" % e.value[3],
noiselevel=-1)
rval = 1
+ if rval != os.EX_OK:
+ pkg_path = bintree.getname(pkg.cpv)
+ head, tail = os.path.split(pkg_path)
+ temp_filename = portage._checksum_failure_temp_file(head, tail)
+ writemsg("File renamed to '%s'\n" % (temp_filename,),
+ noiselevel=-1)
finally:
sys.stdout = stdout_orig
sys.stderr = stderr_orig