summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/terminal.bbclass13
1 files changed, 6 insertions, 7 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index f29aeb0e12..ca28bd24f2 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -15,6 +15,11 @@ 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 for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
19 value = d.getVar(export, True)
20 if value is not None:
21 os.environ[export] = str(value)
22
18 terminal = oe.data.typed_value('OE_TERMINAL', d).lower() 23 terminal = oe.data.typed_value('OE_TERMINAL', d).lower()
19 if terminal == 'none': 24 if terminal == 'none':
20 bb.fatal('Devshell usage disabled with OE_TERMINAL') 25 bb.fatal('Devshell usage disabled with OE_TERMINAL')
@@ -28,14 +33,8 @@ def oe_terminal(command, title, d):
28 except oe.terminal.ExecutionError as exc: 33 except oe.terminal.ExecutionError as exc:
29 bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc)) 34 bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))
30 35
31 env = dict(os.environ)
32 for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
33 value = d.getVar(export, True)
34 if value is not None:
35 env[export] = str(value)
36
37 try: 36 try:
38 oe.terminal.spawn_preferred(command, title, env) 37 oe.terminal.spawn_preferred(command, title)
39 except oe.terminal.NoSupportedTerminals: 38 except oe.terminal.NoSupportedTerminals:
40 bb.fatal('No valid terminal found, unable to open devshell') 39 bb.fatal('No valid terminal found, unable to open devshell')
41 except oe.terminal.ExecutionError as exc: 40 except oe.terminal.ExecutionError as exc: