From 78b8dc75cda318572cb9f3ad8595b2a9222a6e85 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 30 Jul 2007 05:13:31 +0000 Subject: 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 --- pym/portage_manifest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym/portage_manifest.py') 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: -- cgit v1.2.3-1-g7c22