From b79a3b4a8ae7fe0948eca84194fc0f3af2b79c08 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Mon, 21 Jul 2014 16:00:06 +0200 Subject: [PATCH] Wrap fakeroot around MISC_SH_BINARY calls When feature fakeroot is active all pre/post actions need to be called with the fakeroot wrapper. Signed-off-by: Joakim Tjernlund --- pym/_emerge/MiscFunctionsProcess.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/MiscFunctionsProcess.py b/pym/_emerge/MiscFunctionsProcess.py index bada79d..b7f5892 100644 --- a/pym/_emerge/MiscFunctionsProcess.py +++ b/pym/_emerge/MiscFunctionsProcess.py @@ -33,11 +33,15 @@ class MiscFunctionsProcess(AbstractEbuildProcess): if self._dummy_pipe_fd is not None: self.settings["PORTAGE_PIPE_FD"] = str(self._dummy_pipe_fd) + if "fakeroot" in self.settings.features: + kwargs["fakeroot"] = True + # Temporarily unset EBUILD_PHASE so that bashrc code doesn't # think this is a real phase. phase_backup = self.settings.pop("EBUILD_PHASE", None) try: - return spawn(" ".join(args), self.settings, **kwargs) + return spawn(" ".join(args), self.settings, + **portage._native_kwargs(kwargs)) finally: if phase_backup is not None: self.settings["EBUILD_PHASE"] = phase_backup -- 1.8.5.5