Short circuit the loop as soon as missing hashes are detected. (trunk r7044)
authorZac Medico <zmedico@gentoo.org>
Tue, 26 Jun 2007 22:39:15 +0000 (22:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 26 Jun 2007 22:39:15 +0000 (22:39 -0000)
svn path=/main/branches/2.1.2/; revision=7045

pym/portage_manifest.py

index a8df77f43bc0d11b8592cbaa00b02a444d02e75a..cdccbd9fa3b473f64719f844aedfc98bb7d6f174 100644 (file)
@@ -488,12 +488,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: