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, 6 insertions(+) diff --git a/pym/_emerge/MiscFunctionsProcess.py b/pym/_emerge/MiscFunctionsProcess.py index bada79d..5aea14b 100644 --- a/pym/_emerge/MiscFunctionsProcess.py +++ b/pym/_emerge/MiscFunctionsProcess.py @@ -21,6 +21,12 @@ class MiscFunctionsProcess(AbstractEbuildProcess): misc_sh_binary = os.path.join(portage_bin_path, os.path.basename(portage.const.MISC_SH_BINARY)) + if "fakeroot" in settings.features: + fr_file = os.path.join(settings["T"], "fakeroot.state") + self.commands = ["-i " + fr_file + " -s " + fr_file + " -- " \ + + misc_sh_binary] + self.commands + misc_sh_binary = portage.const.FAKEROOT_BINARY + self.args = [portage._shell_quote(misc_sh_binary)] + self.commands if self.logfile is None and \ self.settings.get("PORTAGE_BACKGROUND") != "subprocess": -- 1.8.5.5