When assume-digests is enabled, for digest generation if the number of parsed digests...
authorZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 15:39:37 +0000 (15:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 15:39:37 +0000 (15:39 -0000)
svn path=/main/branches/2.1/; revision=4058

pym/portage.py
pym/portage_manifest.py

index dad2583bc2fbd2ef71e4c730a4762fa276b1f94e..a98fc883df8f39e7d9bc4da4730389b61780ed4a 100644 (file)
@@ -2925,13 +2925,15 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                fetchme = alluris[:]
                checkme = aalist[:]
                # Skip files that we already have digests for.
-               mydigests = Manifest(
-                       mysettings["O"], mysettings["DISTDIR"]).getTypeDigests("DIST")
-               for x in mydigests:
-                       while x in checkme:
-                               i = checkme.index(x)
-                               del fetchme[i]
-                               del checkme[i]
+               mf = Manifest(mysettings["O"], mysettings["DISTDIR"])
+               mydigests = mf.getTypeDigests("DIST")
+               for filename, hashes in mydigests.iteritems():
+                       if len(hashes) == len(mf.hashes):
+                               while filename in checkme:
+                                       i = checkme.index(filename)
+                                       del fetchme[i]
+                                       del checkme[i]
+                       del filename, hashes
        else:
                fetchme=newuris[:]
                checkme=alist[:]
index 13c6932d2d6c474dde270dbb5be77263186015b3..ee9b4b8331ea8edd66aa31d9d46b208d7094ea37 100644 (file)
@@ -459,6 +459,7 @@ class Manifest(object):
                                ((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)):
                                self.fhashdict["DIST"][f] = distfilehashes[f]
                        else: