In digestgen(), don't call fetch for files that already exist but have
authorZac Medico <zmedico@gentoo.org>
Tue, 9 Dec 2008 23:40:37 +0000 (23:40 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 9 Dec 2008 23:40:37 +0000 (23:40 -0000)
invalid zero-size in the manifest.

svn path=/main/trunk/; revision=12188

pym/portage/__init__.py

index 860eea38bd8bcfeacaa45203fa081d4905dbe2d2..5e6fc91258ead6176ddf224b9a87f6b6144ca05f 100644 (file)
@@ -4259,9 +4259,6 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
                                missing_files.append(myfile)
                                continue
                        size = myhashes.get("size")
-                       if size == 0:
-                               missing_files.append(myfile)
-                               continue
 
                        try:
                                st = os.stat(os.path.join(mysettings["DISTDIR"], myfile))
@@ -4269,6 +4266,9 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
                                if e.errno != errno.ENOENT:
                                        raise
                                del e
+                               if size == 0:
+                                       missing_files.append(myfile)
+                                       continue
                                if required_hash_types.difference(myhashes):
                                        missing_files.append(myfile)
                                        continue