diff options
Diffstat (limited to 'meta/classes/terminal.bbclass')
-rw-r--r-- | meta/classes/terminal.bbclass | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass index 2cd6f4c34f..51846c125c 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 += 'XAUTHORITY SHELL DBUS_SESSION_BUS_ADDRESS DISPLAY EXTRA_OEMAKE SCREENDIR' |
8 | OE_TERMINAL_EXPORTS[type] = 'list' | 8 | OE_TERMINAL_EXPORTS[type] = 'list' |
9 | 9 | ||
10 | XAUTHORITY ?= "${HOME}/.Xauthority" | 10 | XAUTHORITY ?= "${HOME}/.Xauthority" |
@@ -15,17 +15,19 @@ def oe_terminal(command, title, d): | |||
15 | import oe.data | 15 | import oe.data |
16 | import oe.terminal | 16 | import oe.terminal |
17 | 17 | ||
18 | env = dict() | ||
19 | |||
18 | for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d): | 20 | for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d): |
19 | value = d.getVar(export, True) | 21 | value = d.getVar(export, True) |
20 | if value is not None: | 22 | if value is not None: |
21 | os.environ[export] = str(value) | 23 | env[export] = str(value) |
22 | 24 | ||
23 | terminal = oe.data.typed_value('OE_TERMINAL', d).lower() | 25 | terminal = oe.data.typed_value('OE_TERMINAL', d).lower() |
24 | if terminal == 'none': | 26 | if terminal == 'none': |
25 | bb.fatal('Devshell usage disabled with OE_TERMINAL') | 27 | bb.fatal('Devshell usage disabled with OE_TERMINAL') |
26 | elif terminal != 'auto': | 28 | elif terminal != 'auto': |
27 | try: | 29 | try: |
28 | oe.terminal.spawn(terminal, command, title, None, d) | 30 | oe.terminal.spawn(terminal, command, title, env, d) |
29 | return | 31 | return |
30 | except oe.terminal.UnsupportedTerminal: | 32 | except oe.terminal.UnsupportedTerminal: |
31 | bb.warn('Unsupported terminal "%s", defaulting to "auto"' % | 33 | bb.warn('Unsupported terminal "%s", defaulting to "auto"' % |
@@ -34,7 +36,7 @@ def oe_terminal(command, title, d): | |||
34 | bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc)) | 36 | bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc)) |
35 | 37 | ||
36 | try: | 38 | try: |
37 | oe.terminal.spawn_preferred(command, title, None, d) | 39 | oe.terminal.spawn_preferred(command, title, env, d) |
38 | except oe.terminal.NoSupportedTerminals: | 40 | except oe.terminal.NoSupportedTerminals: |
39 | bb.fatal('No valid terminal found, unable to open devshell') | 41 | bb.fatal('No valid terminal found, unable to open devshell') |
40 | except oe.terminal.ExecutionError as exc: | 42 | except oe.terminal.ExecutionError as exc: |