diff options
-rw-r--r-- | pym/_emerge/EbuildProcess.py | 10 | ||||
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 9 |
2 files changed, 11 insertions, 8 deletions
diff --git a/pym/_emerge/EbuildProcess.py b/pym/_emerge/EbuildProcess.py index 50edaa16d..70c724314 100644 --- a/pym/_emerge/EbuildProcess.py +++ b/pym/_emerge/EbuildProcess.py @@ -5,7 +5,7 @@ from _emerge.AbstractEbuildProcess import AbstractEbuildProcess import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage.package.ebuild.doebuild:_post_phase_userpriv_perms,' + \ - '_spawn_actionmap,spawn@doebuild_spawn' + '_spawn_actionmap,_unsandboxed_phases,spawn@doebuild_spawn' ) from portage import _shell_quote from portage import os @@ -15,12 +15,6 @@ class EbuildProcess(AbstractEbuildProcess): __slots__ = ('actionmap',) - _unsandboxed_phases = frozenset([ - "clean", "cleanrm", "config", - "help", "info", "postinst", - "preinst", "pretend", "postrm", - "prerm", "setup"]) - def _start(self): # Don't open the log file during the clean phase since the # open file can result in an nfs lock on $T/build.log which @@ -31,7 +25,7 @@ class EbuildProcess(AbstractEbuildProcess): def _spawn(self, args, **kwargs): self.settings["EBUILD_PHASE"] = self.phase - if self.phase in self._unsandboxed_phases: + if self.phase in _unsandboxed_phases: kwargs['free'] = True if self.phase == 'depend': kwargs['droppriv'] = 'userpriv' in self.settings.features diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 195bfdd4f..355088036 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -55,6 +55,13 @@ from _emerge.EbuildPhase import EbuildPhase from _emerge.EbuildSpawnProcess import EbuildSpawnProcess from _emerge.TaskScheduler import TaskScheduler +_unsandboxed_phases = frozenset([ + "clean", "cleanrm", "config", + "help", "info", "postinst", + "preinst", "pretend", "postrm", + "prerm", "setup" +]) + def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, mydbapi): @@ -1074,6 +1081,8 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero def _spawn_phase(phase, settings, **kwargs): if kwargs.get('returnpid'): + if phase in _unsandboxed_phases: + kwargs['free'] = True portage_bin_path = settings["PORTAGE_BIN_PATH"] ebuild_sh_binary = os.path.join(portage_bin_path, os.path.basename(EBUILD_SH_BINARY)) |