From 62a4691a018fe49389cac7f8f63b3d4864d68e80 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 9 Mar 2006 04:07:49 +0000 Subject: Split dyn_package from ebuild.sh to misc-functions.sh and add MISC_SH_BINARY support to spawnebuild. svn path=/main/trunk/; revision=2831 --- pym/portage.py | 13 ++++++++----- pym/portage_const.py | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'pym') 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" -- cgit v1.2.3-1-g7c22