From c9e2e14eefcff06c2542a73f1ecdacdbff8f2bac Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 23 Feb 2007 14:11:50 +0000 Subject: [PATCH] Make fetch() bail out when an "Insufficient data for checksum verification" error occurs. svn path=/main/trunk/; revision=6056 --- pym/portage/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index ee46aeeaf..481c1be37 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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 -- 2.26.2