summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-29 00:12:30 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-29 00:12:30 +0000
commitfa07a9b25eb9c8935d59a29a5032a4c22b18d5f5 (patch)
tree5184309db9af542787a9958f7ab98e2bab8ed02a
parent857238ebbfb51ab5000dca5a6a7918fb59622c56 (diff)
downloadportage-fa07a9b25eb9c8935d59a29a5032a4c22b18d5f5.tar.gz
portage-fa07a9b25eb9c8935d59a29a5032a4c22b18d5f5.tar.bz2
portage-fa07a9b25eb9c8935d59a29a5032a4c22b18d5f5.zip
Fix more references to MISC_SH_BINARY so that they work properly
with variable PORTAGE_BIN_PATH. svn path=/main/trunk/; revision=8735
-rw-r--r--pym/portage/__init__.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index f16e2d4bd..cd3ebbe72 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3619,7 +3619,13 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None):
apply_secpass_permissions(fpath, uid=myuid, gid=mygid,
mode=mystat.st_mode, stat_cached=mystat,
follow_links=False)
- mycommand = " ".join([MISC_SH_BINARY, "install_qa_check", "install_symlink_html_docs"])
+ # Note: PORTAGE_BIN_PATH may differ from the global
+ # constant when portage is reinstalling itself.
+ portage_bin_path = mysettings["PORTAGE_BIN_PATH"]
+ misc_sh_binary = os.path.join(portage_bin_path,
+ os.path.basename(MISC_SH_BINARY))
+ mycommand = " ".join([portage_bin_path,
+ "install_qa_check", "install_symlink_html_docs"])
qa_retval = spawn(mycommand, mysettings, debug=debug, logfile=logfile, **kwargs)
if qa_retval:
writemsg("!!! install_qa_check failed; exiting.\n",
@@ -4162,6 +4168,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
eerror(l, phase=mydo, key=mysettings.mycpv)
return retval
+ # Note: PORTAGE_BIN_PATH may differ from the global
+ # constant when portage is reinstalling itself.
+ portage_bin_path = mysettings["PORTAGE_BIN_PATH"]
+ misc_sh_binary = os.path.join(portage_bin_path,
+ os.path.basename(MISC_SH_BINARY))
+
logfile=None
builddir_lock = None
tmpdir = None
@@ -4325,7 +4337,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
if phase_retval == os.EX_OK:
# Post phase logic and tasks that have been factored out of
# ebuild.sh.
- myargs = [MISC_SH_BINARY, "preinst_bsdflags", "preinst_mask",
+ myargs = [misc_sh_binary, "preinst_bsdflags", "preinst_mask",
"preinst_sfperms", "preinst_selinux_labels",
"preinst_suid_scan"]
_doebuild_exit_status_unlink(
@@ -4346,7 +4358,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
if phase_retval == os.EX_OK:
# Post phase logic and tasks that have been factored out of
# ebuild.sh.
- myargs = [MISC_SH_BINARY, "postinst_bsdflags"]
+ myargs = [misc_sh_binary, "postinst_bsdflags"]
_doebuild_exit_status_unlink(
mysettings.get("EBUILD_EXIT_STATUS_FILE"))
mysettings["EBUILD_PHASE"] = ""
@@ -4495,13 +4507,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
fakeroot = "fakeroot" in mysettings.features
- # Note: PORTAGE_BIN_PATH may differ from the global
- # constant when portage is reinstalling itself.
- portage_bin_path = mysettings["PORTAGE_BIN_PATH"]
ebuild_sh = os.path.join(portage_bin_path,
os.path.basename(EBUILD_SH_BINARY)) + " %s"
- misc_sh = os.path.join(portage_bin_path,
- os.path.basename(MISC_SH_BINARY)) + " dyn_%s"
+ misc_sh = misc_sh_binary + " dyn_%s"
# args are for the to spawn function
actionmap = {