summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/EbuildProcess.py
diff options
context:
space:
mode:
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)