summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-09 04:07:49 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-09 04:07:49 +0000
commit62a4691a018fe49389cac7f8f63b3d4864d68e80 (patch)
tree44054f3fba2258be8fc49aae61c8390b64104be6 /pym
parent7661d14ab168074f7d9b5315fff7196ac6bc5759 (diff)
downloadportage-62a4691a018fe49389cac7f8f63b3d4864d68e80.tar.gz
portage-62a4691a018fe49389cac7f8f63b3d4864d68e80.tar.bz2
portage-62a4691a018fe49389cac7f8f63b3d4864d68e80.zip
Split dyn_package from ebuild.sh to misc-functions.sh and add MISC_SH_BINARY support to spawnebuild.
svn path=/main/trunk/; revision=2831
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py13
-rw-r--r--pym/portage_const.py1
2 files changed, 9 insertions, 5 deletions
diff --git a/pym/portage.py b/pym/portage.py
index e3d5ad742..6468b0f87 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -86,7 +86,7 @@ try:
MOVE_BINARY, PRELINK_BINARY, WORLD_FILE, MAKE_CONF_FILE, MAKE_DEFAULTS_FILE, \
DEPRECATED_PROFILE_FILE, USER_VIRTUALS_FILE, EBUILD_SH_ENV_FILE, \
INVALID_ENV_FILE, CUSTOM_MIRRORS_FILE, CONFIG_MEMORY_FILE,\
- INCREMENTALS, STICKIES, EAPI
+ INCREMENTALS, STICKIES, EAPI, MISC_SH_BINARY
from portage_data import ostype, lchown, userland, secpass, uid, wheelgid, \
portage_uid, portage_gid
@@ -2367,18 +2367,21 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None):
retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile)
if retval:
return retval
- # spawn ebuild.sh
- mycommand = EBUILD_SH_BINARY + " "
+ # spawn ebuild.sh or misc-functions.sh as appropriate
+ if mydo in ["package"]:
+ mycommand = MISC_SH_BINARY + " dyn_" + mydo
+ else:
+ mycommand = EBUILD_SH_BINARY + " " + mydo
if selinux_enabled and ("sesandbox" in features) and (mydo in ["unpack","compile","test","install"]):
con=selinux.getcontext()
con=string.replace(con,mysettings["PORTAGE_T"],mysettings["PORTAGE_SANDBOX_T"])
selinux.setexec(con)
- retval=spawn(mycommand + mydo,mysettings,debug=debug,
+ retval=spawn(mycommand, mysettings, debug=debug,
free=actionmap[mydo]["args"][0],
droppriv=actionmap[mydo]["args"][1],logfile=logfile)
selinux.setexec(None)
else:
- retval=spawn(mycommand + mydo,mysettings, debug=debug,
+ retval=spawn(mycommand, mysettings, debug=debug,
free=actionmap[mydo]["args"][0],
droppriv=actionmap[mydo]["args"][1],logfile=logfile)
return retval
diff --git a/pym/portage_const.py b/pym/portage_const.py
index 99082a77c..04b61c4b7 100644
--- a/pym/portage_const.py
+++ b/pym/portage_const.py
@@ -24,6 +24,7 @@ PROFILE_PATH = "/etc/make.profile"
LOCALE_DATA_PATH = PORTAGE_BASE_PATH+"/locale"
EBUILD_SH_BINARY = PORTAGE_BIN_PATH+"/ebuild.sh"
+MISC_SH_BINARY = PORTAGE_BIN_PATH + "/misc-functions.sh"
SANDBOX_BINARY = "/usr/bin/sandbox"
BASH_BINARY = "/bin/bash"
MOVE_BINARY = "/bin/mv"