From 0a2662a48eaf0487db043c348e2834bb9cdd0466 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 18 Feb 2013 13:19:50 +0000 Subject: devshell.bbclass: Allow running devshell and fakeroot together Currently its hard to run a devshell complete with fakeroot context. This patch allows the fakeroot flag on the task to do this, as with any other task. Since we may need to start X terminal applications, we need to only start the fakeroot session on the final command, hence the hoops this code jumps through. As always with fakeroot, you can break out and run a command without the fake permissions with syntax like "PSEUDO_UNLOAD=1 " [YOCTO #3374] Signed-off-by: Richard Purdie Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/classes/terminal.bbclass | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'meta/classes/terminal.bbclass') diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass index d5a6277896..8cebad4162 100644 --- a/meta/classes/terminal.bbclass +++ b/meta/classes/terminal.bbclass @@ -25,6 +25,11 @@ def oe_terminal(command, title, d): if value is not None: os.environ[export] = str(value) env[export] = str(value) + if export == "PSEUDO_DISABLED": + if "PSEUDO_UNLOAD" in os.environ: + del os.environ["PSEUDO_UNLOAD"] + if "PSEUDO_UNLOAD" in env: + del env["PSEUDO_UNLOAD"] # Add in all variables from the user's original environment which # haven't subsequntly been set/changed -- cgit 1.2.3-korg