summaryrefslogtreecommitdiffstats
path: root/meta/classes/terminal.bbclass
diff options
context:
space:
mode:
authorAnders Darander <anders@chargestorm.se>2014-01-10 15:59:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-10 15:15:47 +0000
commita5e6926cd409140d16391c72316da00ffbfe5429 (patch)
tree9b8a7996fdc05b41cf1a63a6e3092be447ebf0f5 /meta/classes/terminal.bbclass
parentbdad58c51dfdda5253933c3e371a7d526cdbb67e (diff)
downloadopenembedded-core-a5e6926cd409140d16391c72316da00ffbfe5429.tar.gz
terminal.bbclass: do not export PS1
With a complex PS1 setup, PS1 might not have all characters correctly escaped when terminal.bbclass writes the export. This caused the run.do_terminal.PID to terminate, making it impossible to use the devshell. As the spawned shell will parse e.g. .bashrc (or whatever rc-file is being used), PS1 will be reset in the devshell. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/terminal.bbclass')
-rw-r--r--meta/classes/terminal.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 774f0559fb..e577c6d594 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -64,6 +64,10 @@ def oe_terminal(command, title, d):
envdata.setVar(key, str(value))
envdata.setVarFlag(key, 'export', 1)
+ # A complex PS1 might need more escaping of chars.
+ # Lets not export PS1 instead.
+ envdata.delVar("PS1")
+
# Replace command with an executable wrapper script
command = emit_terminal_func(command, envdata, d)