summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-14 05:51:29 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-14 05:51:29 +0000
commit8bce06c99d399c288ae2d12ed4722e34113aa7a8 (patch)
tree9f37ffebaa2ba490cde1163d2c66c9e2d490f5cf /pym
parentRemove reentrance support for dblink.lockdb() since it's no longer used and i... (diff)
downloadportage-multirepo-8bce06c99d399c288ae2d12ed4722e34113aa7a8.tar.gz
portage-multirepo-8bce06c99d399c288ae2d12ed4722e34113aa7a8.tar.bz2
portage-multirepo-8bce06c99d399c288ae2d12ed4722e34113aa7a8.zip
For bug #154986, show the usual "Filesize does not match recorded size" message even for fetch restricted files.
svn path=/main/trunk/; revision=5036
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index c6dfd928..23f51c50 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2264,7 +2264,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
# assume that it is fully downloaded.
continue
else:
- if mystat.st_size < mydigests[myfile]["size"]:
+ if mystat.st_size < mydigests[myfile]["size"] and \
+ not restrict_fetch:
fetched = 1 # Try to resume this download.
else:
verified_ok, reason = portage_checksum.verify_all(
@@ -2277,7 +2278,7 @@ 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 can_fetch:
+ if can_fetch and not restrict_fetch:
writemsg("Refetching...\n\n",
noiselevel=-1)
os.unlink(myfile_path)