Make fetch() fetch as many files as possible, even if some fail, when in
authorZac Medico <zmedico@gentoo.org>
Mon, 13 Oct 2008 00:39:21 +0000 (00:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 13 Oct 2008 00:39:21 +0000 (00:39 -0000)
fetchonly mode.

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

pym/portage/__init__.py

index 2471ab3511c83f21ff346858d490d44fc9c21e77..b799996da7e14bc20eb50f0d824ad18fd7d4714b 100644 (file)
@@ -3623,6 +3623,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                        del distlocks_subdir
 
        distdir_writable = can_fetch and not fetch_to_ro
+       failed_files = set()
 
        for myfile in filedict:
                """
@@ -4105,7 +4106,12 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                        else:
                                writemsg("!!! Couldn't download '%s'. Aborting.\n" % myfile,
                                        noiselevel=-1)
+                       if fetchonly:
+                               failed_files.add(myfile)
+                               continue
                        return 0
+       if failed_files:
+               return 0
        return 1
 
 def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None):