From 1b8d4934e4bc9f40f39603e410f62bd133cf80d7 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Mon, 21 Jul 2014 17:00:57 +0200 Subject: [PATCH 2/2] Do not force "pretend" if fakeroot If feature fakeroot is set, do not force --pretend as we are faking root privs. Signed-off-by: Joakim Tjernlund --- pym/_emerge/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index b935139..0a696a1 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -3825,8 +3825,8 @@ def run_action(emerge_config): # check if root user is the current user for the actions where emerge needs this if portage.data.secpass < 2: # We've already allowed "--version" and "--help" above. - if "--pretend" not in emerge_config.opts and \ - emerge_config.action not in ("search", "info"): + if not "fakeroot" in emerge_config.target_config.settings.features and "--pretend" not in \ + emerge_config.opts and emerge_config.action not in ("search", "info"): need_superuser = emerge_config.action in ('clean', 'depclean', 'deselect', 'prune', 'unmerge') or not \ (fetchonly or \ -- 1.8.5.5