Force fetch if the number of parsed digests does not match the number of digest types...
authorZac Medico <zmedico@gentoo.org>
Mon, 3 Jul 2006 01:45:38 +0000 (01:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 3 Jul 2006 01:45:38 +0000 (01:45 -0000)
svn path=/main/trunk/; revision=3773

pym/portage.py

index b995ab0544ee2b2fca6f735c2cdccf6d7aeabd39..0948f4fed103cf457d6bffb8b14a0a6fd5b7b50d 100644 (file)
@@ -4,7 +4,7 @@
 # $Id$
 
 
-VERSION="$Rev$"[6:-2] + "-svn"
+VERSION="2.1.1_pre2-r2"
 
 # ===========================================================================
 # START OF IMPORTS -- START OF IMPORTS -- START OF IMPORTS -- START OF IMPORT
@@ -2813,13 +2813,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[:]