summaryrefslogtreecommitdiffstats
path: root/meta/classes/terminal.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-13 09:26:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-13 09:42:09 +0000
commit8406db9e1178926f2224f88ba9e6814f661a8bc6 (patch)
tree83ae42af4ff9c2f9e7750f8b91135ab739e906c3 /meta/classes/terminal.bbclass
parentb3d13e058a86cafc33aeab11eddfde77b1fd884f (diff)
downloadpoky-8406db9e1178926f2224f88ba9e6814f661a8bc6.tar.gz
terminal: Use original PATH for terminals
Now that we filter out PATH to only the utilities we rely upon, the devshel terminal was broken since it can no longer find the terminals. Even if we fix that, the user couldn't access any of their commands within devshell which somewhat defeats its purpose. Add the original PATH back to the environment to restore that behaviour since this is more in line with user expectations and it wouldn't be possible (or desireable) to whitelist all the commands a user might want to use from the shell. (From OE-Core rev: 67d7ea2db8bce766daf3419feae3cd8045af5114) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/terminal.bbclass')
-rw-r--r--meta/classes/terminal.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 62409c0815..a27e10c6ec 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -66,6 +66,11 @@ def oe_terminal(command, title, d):
66 envdata.setVar(key, str(value)) 66 envdata.setVar(key, str(value))
67 envdata.setVarFlag(key, 'export', '1') 67 envdata.setVarFlag(key, 'export', '1')
68 68
69 # Use original PATH as a fallback
70 path = d.getVar('PATH') + ":" + origbbenv.getVar('PATH')
71 os.environ['PATH'] = path
72 envdata.setVar('PATH', path)
73
69 # A complex PS1 might need more escaping of chars. 74 # A complex PS1 might need more escaping of chars.
70 # Lets not export PS1 instead. 75 # Lets not export PS1 instead.
71 envdata.delVar("PS1") 76 envdata.delVar("PS1")