summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/EbuildProcess.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-17 00:48:23 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-17 00:48:23 -0700
commit7021db2584aff976f6a4e7bc6c2633f674e74ad2 (patch)
treec7e2263a5dad250fd89f0537aaf26b108f09c68d /pym/_emerge/EbuildProcess.py
parent5729491242cb2be1b5fa8de1bc2761d4e26dca2b (diff)
downloadportage-7021db2584aff976f6a4e7bc6c2633f674e74ad2.tar.gz
portage-7021db2584aff976f6a4e7bc6c2633f674e74ad2.tar.bz2
portage-7021db2584aff976f6a4e7bc6c2633f674e74ad2.zip
Make doebuild() use EbuildPhase to execute all phase (unless returnpid
is True, which is only for the "depend" phase now).
Diffstat (limited to 'pym/_emerge/EbuildProcess.py')
-rw-r--r--pym/_emerge/EbuildProcess.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pym/_emerge/EbuildProcess.py b/pym/_emerge/EbuildProcess.py
index 84a8d1b61..50edaa16d 100644
--- a/pym/_emerge/EbuildProcess.py
+++ b/pym/_emerge/EbuildProcess.py
@@ -15,6 +15,12 @@ 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
@@ -25,6 +31,10 @@ class EbuildProcess(AbstractEbuildProcess):
def _spawn(self, args, **kwargs):
self.settings["EBUILD_PHASE"] = self.phase
+ if self.phase in self._unsandboxed_phases:
+ kwargs['free'] = True
+ if self.phase == 'depend':
+ kwargs['droppriv'] = 'userpriv' in self.settings.features
actionmap = self.actionmap
if actionmap is None:
actionmap = _spawn_actionmap(self.settings)