summaryrefslogtreecommitdiffstats
path: root/pym/portage_manifest.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-30 05:13:31 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-30 05:13:31 +0000
commit78b8dc75cda318572cb9f3ad8595b2a9222a6e85 (patch)
tree1d17760acc654c61c6a78c9b0c3c108de56cb69f /pym/portage_manifest.py
parente5cb173a0a9852e5ba7f731ccb675ed0146c5fe6 (diff)
downloadportage-78b8dc75cda318572cb9f3ad8595b2a9222a6e85.tar.gz
portage-78b8dc75cda318572cb9f3ad8595b2a9222a6e85.tar.bz2
portage-78b8dc75cda318572cb9f3ad8595b2a9222a6e85.zip
Add sanity checks in fetch() and digestgen() to automatically detect and handle invalid empty distfiles since some users have reported difficulty when trying to create digests. (branches/2.1.2 r7039:7045)
svn path=/main/branches/2.1.2.9/; revision=7485
Diffstat (limited to 'pym/portage_manifest.py')
-rw-r--r--pym/portage_manifest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py
index 6645963dd..ff2603fa8 100644
--- a/pym/portage_manifest.py
+++ b/pym/portage_manifest.py
@@ -482,12 +482,12 @@ class Manifest(object):
except OSError:
pass
if f in distfilehashes and \
+ not required_hash_types.difference(distfilehashes[f]) and \
((assumeDistHashesSometimes and mystat is None) or \
(assumeDistHashesAlways and mystat is None) or \
(assumeDistHashesAlways and mystat is not None and \
len(distfilehashes[f]) == len(self.hashes) and \
- distfilehashes[f]["size"] == mystat.st_size)) and \
- not required_hash_types.difference(distfilehashes[f]):
+ distfilehashes[f]["size"] == mystat.st_size)):
self.fhashdict["DIST"][f] = distfilehashes[f]
else:
try: