summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-28 22:57:31 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-28 22:57:31 +0000
commit27515bfa43d9d68327a42b140a16de1dd2f288b0 (patch)
treefbaa0c641ea965730372357f53084564e23bcdfc
parentf7af2af3bcf3be308dfebb99fbc5b14b1ba53ab3 (diff)
downloadportage-27515bfa43d9d68327a42b140a16de1dd2f288b0.tar.gz
portage-27515bfa43d9d68327a42b140a16de1dd2f288b0.tar.bz2
portage-27515bfa43d9d68327a42b140a16de1dd2f288b0.zip
Fix references to PORTAGE_BIN_PATH in doebuild() to use the config
setting since it may be a temp directory when portage is reinstalling itself. svn path=/main/trunk/; revision=8733
-rw-r--r--pym/portage/__init__.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 05f188d87..cd3f7517a 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3741,8 +3741,11 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
mysplit=mysettings["PATH"].split(":")
else:
mysplit=[]
- if PORTAGE_BIN_PATH not in mysplit:
- mysettings["PATH"]=PORTAGE_BIN_PATH+":"+mysettings["PATH"]
+ # Note: PORTAGE_BIN_PATH may differ from the global constant
+ # when portage is reinstalling itself.
+ portage_bin_path = mysettings["PORTAGE_BIN_PATH"]
+ if portage_bin_path not in mysplit:
+ mysettings["PATH"] = portage_bin_path + ":" + mysettings["PATH"]
# Sandbox needs cannonical paths.
mysettings["PORTAGE_TMPDIR"] = os.path.realpath(
@@ -4412,11 +4415,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
# mod_echo module might push the original message off of the
# top of the terminal and prevent the user from being able to
# see it.
- mysettings["EBUILD_PHASE"] = "unpack"
- cmd = "source '%s/isolated-functions.sh' ; " % PORTAGE_BIN_PATH
- cmd += "eerror \"Fetch failed for '%s'\"" % mycpv
- portage.process.spawn(["bash", "-c", cmd],
- env=mysettings.environ())
+ from portage.elog.messages import eerror
+ eerror("Fetch failed for '%s'" % mycpv,
+ phase="unpack", key=mycpv)
from portage.elog import elog_process
elog_process(mysettings.mycpv, mysettings)
return 1