summaryrefslogtreecommitdiffstats
path: root/meta/classes/terminal.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-05 16:01:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-06 23:41:20 +0000
commitfef84540e33e74b74f5951cc46dff9a93eb5e446 (patch)
tree4af3a8a69f4749d4b4e36edb820bab70021eac32 /meta/classes/terminal.bbclass
parentbc2b60c021e0bc4403021ae2739869c073189794 (diff)
downloadpoky-fef84540e33e74b74f5951cc46dff9a93eb5e446.tar.gz
terminal.bbclass: Use BB_ORIGENV to restore user environmental variables
(From OE-Core rev: 131643695d7ba9d0c32bf8e192e7e3942f50f318) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/terminal.bbclass')
-rw-r--r--meta/classes/terminal.bbclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index cec854d54a..d5a6277896 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -4,7 +4,7 @@ OE_TERMINAL[choices] = 'auto none \
4 ${@" ".join(o.name \ 4 ${@" ".join(o.name \
5 for o in oe.terminal.prioritized())}' 5 for o in oe.terminal.prioritized())}'
6 6
7OE_TERMINAL_EXPORTS += 'XAUTHORITY SHELL DBUS_SESSION_BUS_ADDRESS DISPLAY EXTRA_OEMAKE SCREENDIR' 7OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE'
8OE_TERMINAL_EXPORTS[type] = 'list' 8OE_TERMINAL_EXPORTS[type] = 'list'
9 9
10XAUTHORITY ?= "${HOME}/.Xauthority" 10XAUTHORITY ?= "${HOME}/.Xauthority"
@@ -26,6 +26,17 @@ def oe_terminal(command, title, d):
26 os.environ[export] = str(value) 26 os.environ[export] = str(value)
27 env[export] = str(value) 27 env[export] = str(value)
28 28
29 # Add in all variables from the user's original environment which
30 # haven't subsequntly been set/changed
31 origbbenv = d.getVar("BB_ORIGENV", False) or {}
32 for key in origbbenv:
33 if key in env:
34 continue
35 value = origbbenv.getVar(key, True)
36 if value is not None:
37 os.environ[key] = str(value)
38 env[key] = str(value)
39
29 terminal = oe.data.typed_value('OE_TERMINAL', d).lower() 40 terminal = oe.data.typed_value('OE_TERMINAL', d).lower()
30 if terminal == 'none': 41 if terminal == 'none':
31 bb.fatal('Devshell usage disabled with OE_TERMINAL') 42 bb.fatal('Devshell usage disabled with OE_TERMINAL')