summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-11 22:43:01 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-11 22:43:01 +0000
commitf8f995bf328bb6792d7f6d5a2018c47bccca73a3 (patch)
treeb7059041368de4d42c0e6023115b8d199a6679f1
parentfad7ba8c330e8f62b4ec079c4aea4cf134c95b69 (diff)
downloadportage-f8f995bf328bb6792d7f6d5a2018c47bccca73a3.tar.gz
portage-f8f995bf328bb6792d7f6d5a2018c47bccca73a3.tar.bz2
portage-f8f995bf328bb6792d7f6d5a2018c47bccca73a3.zip
All portage.fetch() to succeed even if FETCHCOMMAND and RESUMECOMMAND aren't defined.
svn path=/main/trunk/; revision=5274
-rw-r--r--pym/portage.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/pym/portage.py b/pym/portage.py
index c5cdc8cc0..2d9d11d3f 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2042,12 +2042,6 @@ def spawn(mystring,mysettings,debug=0,free=0,droppriv=0,sesandbox=0,fd_pipes=Non
def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",use_locks=1, try_mirrors=1):
"fetch files. Will use digest file if available."
- for var_name in ("FETCHCOMMAND", "RESUMECOMMAND"):
- if not mysettings.get(var_name, None):
- writemsg(("!!! %s is unset. It should have been defined " + \
- "in /etc/make.globals.\n") % var_name,
- noiselevel=-1)
- return 0
features = mysettings.features
# 'nomirror' is bad/negative logic. You Restrict mirroring, not no-mirroring.
if ("mirror" in mysettings["RESTRICT"].split()) or \
@@ -2172,6 +2166,10 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
can_fetch=True
+ for var_name in ("FETCHCOMMAND", "RESUMECOMMAND"):
+ if not mysettings.get(var_name, None):
+ can_fetch = False
+
if not listonly:
dirmode = 02070
filemode = 060
@@ -2318,6 +2316,11 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
else:
writemsg("!!! File %s isn't fully fetched, but unable to complete it\n" % myfile,
noiselevel=-1)
+ for var_name in ("FETCHCOMMAND", "RESUMECOMMAND"):
+ if not mysettings.get(var_name, None):
+ writemsg(("!!! %s is unset. It should " + \
+ "have been defined in /etc/make.globals.\n") \
+ % var_name, noiselevel=-1)
return 0
else:
continue