aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/devshell.bbclass19
-rw-r--r--meta/classes/terminal.bbclass5
2 files changed, 23 insertions, 1 deletions
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index ddb6e55303..a780118a12 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -1,10 +1,27 @@
inherit terminal
+DEVSHELL = "${SHELL}"
+
python do_devshell () {
- oe_terminal(d.getVar('SHELL', True), 'OpenEmbedded Developer Shell', d)
+ oe_terminal(d.getVar('DEVSHELL', True), 'OpenEmbedded Developer Shell', d)
}
addtask devshell after do_patch
do_devshell[dirs] = "${S}"
do_devshell[nostamp] = "1"
+
+# devshell and fakeroot/pseudo need careful handling since only the final
+# command should run under fakeroot emulation, any X connection should
+# be done as the normal user. We therfore carefully construct the envionment
+# manually
+python () {
+ if d.getVarFlag("do_devshell", "fakeroot"):
+ d.prependVar("DEVSHELL", "pseudo ")
+ fakeenv = d.getVar("FAKEROOTENV", True).split()
+ for f in fakeenv:
+ k = f.split("=")
+ d.setVar(k[0], k[1])
+ d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0])
+ d.delVarFlag("do_devshell", "fakeroot")
+}
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