From 5f2623e7deff181174140e5006395481571d80d8 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Mon, 21 Jul 2014 16:00:06 +0200 Subject: [PATCH 1/2] 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/MiscFunctionsProcess.py b/pym/_emerge/MiscFunctionsProcess.py index bada79d..8fe24e4 100644 --- a/pym/_emerge/MiscFunctionsProcess.py +++ b/pym/_emerge/MiscFunctionsProcess.py @@ -20,8 +20,13 @@ class MiscFunctionsProcess(AbstractEbuildProcess): portage_bin_path = settings["PORTAGE_BIN_PATH"] misc_sh_binary = os.path.join(portage_bin_path, os.path.basename(portage.const.MISC_SH_BINARY)) + fr_args = "" + if "fakeroot" in settings.features: + fr_args = "-i ${T}/fakeroot.state -s ${T}/fakeroot.state -- " + fr_args += misc_sh_binary + misc_sh_binary = portage.const.FAKEROOT_BINARY - self.args = [portage._shell_quote(misc_sh_binary)] + self.commands + self.args = [portage._shell_quote(misc_sh_binary)] + [fr_args] + self.commands if self.logfile is None and \ self.settings.get("PORTAGE_BACKGROUND") != "subprocess": self.logfile = settings.get("PORTAGE_LOG_FILE") -- 1.8.5.5