diff options
| -rw-r--r-- | meta/classes/terminal.bbclass | 13 |
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 | ||
| 7 | OE_TERMINAL_EXPORTS += 'XAUTHORITY SHELL DBUS_SESSION_BUS_ADDRESS DISPLAY EXTRA_OEMAKE SCREENDIR' | 7 | OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE' |
| 8 | OE_TERMINAL_EXPORTS[type] = 'list' | 8 | OE_TERMINAL_EXPORTS[type] = 'list' |
| 9 | 9 | ||
| 10 | XAUTHORITY ?= "${HOME}/.Xauthority" | 10 | XAUTHORITY ?= "${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') |
