From: Zac Medico Date: Mon, 30 Jun 2008 00:18:56 +0000 (-0000) Subject: * Tweak conditionals in doebuild() to fix emerge --fetch breakage reported X-Git-Tag: v2.2_rc2~273 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=402201cbbf7d032315db4badf58d3a3dd326fc6d;p=portage.git * Tweak conditionals in doebuild() to fix emerge --fetch breakage reported by Arfrever. * Change a couple EMERGE_FROM conditionals to use the "returnpid" parameter instead. svn path=/main/trunk/; revision=10852 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 922c620b6..456f4e013 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -2940,7 +2940,7 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero env=mysettings.environ() keywords["opt_name"]="[%s]" % mysettings["PF"] - if "EMERGE_FROM" in mysettings: + if keywords.get("returnpid"): # emerge handles logging externally keywords.pop("logfile", None) @@ -4166,7 +4166,7 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0): # parse actionmap to spawn ebuild with the appropriate args def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0, logfile=None, fd_pipes=None, returnpid=False): - if "EMERGE_FROM" not in mysettings and \ + if not returnpid and \ (alwaysdep or "noauto" not in mysettings.features): # process dependency first if "dep" in actionmap[mydo]: @@ -5317,7 +5317,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, # unpack compile install`, we will try and fetch 4 times :/ need_distfiles = (mydo in ("fetch", "unpack") or \ mydo not in ("digest", "manifest") and "noauto" not in features) - if not ("EMERGE_FROM" in mysettings and mydo != "unpack") and \ + emerge_skip_distfiles = "EMERGE_FROM" in mysettings and \ + mydo not in ("fetch", "unpack") + if not emerge_skip_distfiles and \ need_distfiles and not fetch( fetchme, mysettings, listonly=listonly, fetchonly=fetchonly): if have_build_dirs: @@ -5350,7 +5352,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, return 1 # See above comment about fetching only when needed - if not ("EMERGE_FROM" in mysettings and mydo != "unpack") and \ + if not emerge_skip_distfiles and \ not digestcheck(checkme, mysettings, "strict" in features): return 1