summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-23 14:11:50 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-23 14:11:50 +0000
commitc9e2e14eefcff06c2542a73f1ecdacdbff8f2bac (patch)
treedbbec13593ce2a481ed0d31d45c86a917cf74a1e
parent922e7a0ae7c9d94ed24832ebd6f94153ffe7d66f (diff)
downloadportage-c9e2e14eefcff06c2542a73f1ecdacdbff8f2bac.tar.gz
portage-c9e2e14eefcff06c2542a73f1ecdacdbff8f2bac.tar.bz2
portage-c9e2e14eefcff06c2542a73f1ecdacdbff8f2bac.zip
Make fetch() bail out when an "Insufficient data for checksum verification" error occurs.
svn path=/main/trunk/; revision=6056
-rw-r--r--pym/portage/__init__.py4
1 files changed, 4 insertions, 0 deletions
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