summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-30 00:18:56 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-30 00:18:56 +0000
commit402201cbbf7d032315db4badf58d3a3dd326fc6d (patch)
treebbace46c7c18b9f1ff0b336ee2c5a69b95190b0f
parent4456682c4c15a288c5a3cb6ee264500eb0bb196c (diff)
downloadportage-402201cbbf7d032315db4badf58d3a3dd326fc6d.tar.gz
portage-402201cbbf7d032315db4badf58d3a3dd326fc6d.tar.bz2
portage-402201cbbf7d032315db4badf58d3a3dd326fc6d.zip
* 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
-rw-r--r--pym/portage/__init__.py10
1 files changed, 6 insertions, 4 deletions
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