From 7021db2584aff976f6a4e7bc6c2633f674e74ad2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 17 Aug 2010 00:48:23 -0700 Subject: Make doebuild() use EbuildPhase to execute all phase (unless returnpid is True, which is only for the "depend" phase now). --- pym/_emerge/EbuildProcess.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pym/_emerge') 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) -- cgit v1.2.3-1-g7c22