diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-12-11 22:16:40 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-12-11 22:16:40 +0000 |
commit | fad7ba8c330e8f62b4ec079c4aea4cf134c95b69 (patch) | |
tree | a2fba5a7e14eae693be23a86bbdf4a082b339f94 | |
parent | 00cf943a1640410a134ac70bf52f85b05a3f2b03 (diff) | |
download | portage-fad7ba8c330e8f62b4ec079c4aea4cf134c95b69.tar.gz portage-fad7ba8c330e8f62b4ec079c4aea4cf134c95b69.tar.bz2 portage-fad7ba8c330e8f62b4ec079c4aea4cf134c95b69.zip |
Make the fetch phase bail out if FETCHCOMMAND or RESUMECOMMAND are missing. Thanks to Flameeyes for reporting.
svn path=/main/trunk/; revision=5273
-rw-r--r-- | pym/portage.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py index 2dc16e016..c5cdc8cc0 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2042,6 +2042,12 @@ 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 \ |