[gnome-continuous-yocto/gnomeostree-3.28-rocko: 5060/8267] terminal: Use original PATH for terminals
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 5060/8267] terminal: Use original PATH for terminals
- Date: Sun, 17 Dec 2017 02:54:34 +0000 (UTC)
commit 8406db9e1178926f2224f88ba9e6814f661a8bc6
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Mon Mar 13 09:26:54 2017 +0000
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>
meta/classes/terminal.bbclass | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 62409c0..a27e10c 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -66,6 +66,11 @@ def oe_terminal(command, title, d):
envdata.setVar(key, str(value))
envdata.setVarFlag(key, 'export', '1')
+ # Use original PATH as a fallback
+ path = d.getVar('PATH') + ":" + origbbenv.getVar('PATH')
+ os.environ['PATH'] = path
+ envdata.setVar('PATH', path)
+
# A complex PS1 might need more escaping of chars.
# Lets not export PS1 instead.
envdata.delVar("PS1")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]