Make fetch() bail out when an "Insufficient data for checksum verification" error...
authorZac Medico <zmedico@gentoo.org>
Fri, 23 Feb 2007 14:11:50 +0000 (14:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 23 Feb 2007 14:11:50 +0000 (14:11 -0000)
svn path=/main/trunk/; revision=6056

pym/portage/__init__.py

index ee46aeeaf36549606b1a54c95d55e4f5aeed52bd..481c1be37ebc78b3ca1606ef9f05272546f951d5 100644 (file)
@@ -2406,6 +2406,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                                                                writemsg(("!!! Got:      %s\n" + \
                                                                        "!!! Expected: %s\n") % \
                                                                        (reason[1], reason[2]), noiselevel=-1)
+                                                               if reason[0] == "Insufficient data for checksum verification":
+                                                                       return 0
                                                                if can_fetch and not restrict_fetch:
                                                                        writemsg("Refetching...\n\n",
                                                                                noiselevel=-1)
@@ -2545,6 +2547,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                                                                                noiselevel=-1)
                                                                        writemsg("!!! Got:      %s\n!!! Expected: %s\n" % \
                                                                                (reason[1], reason[2]), noiselevel=-1)
+                                                                       if reason[0] == "Insufficient data for checksum verification":
+                                                                               return 0
                                                                        writemsg("Removing corrupt distfile...\n", noiselevel=-1)
                                                                        os.unlink(mysettings["DISTDIR"]+"/"+myfile)
                                                                        fetched=0