Make the fetch phase bail out if FETCHCOMMAND or RESUMECOMMAND are missing. Thanks...
authorZac Medico <zmedico@gentoo.org>
Mon, 11 Dec 2006 22:16:40 +0000 (22:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 11 Dec 2006 22:16:40 +0000 (22:16 -0000)
svn path=/main/trunk/; revision=5273

pym/portage.py

index 2dc16e016dee8c840da150967fa8b49d7cbc9368..c5cdc8cc02ac74d44608aca057f138ad2f7c9ef9 100644 (file)
@@ -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 \