[oe-commits] Anders Darander : terminal.bbclass: do not export PS1

git at git.openembedded.org git at git.openembedded.org
Sun Feb 9 11:01:54 UTC 2014


Module: openembedded-core.git
Branch: dora
Commit: a7d489f3341262b662e720170d64caf7092a956b
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=a7d489f3341262b662e720170d64caf7092a956b

Author: Anders Darander <anders at chargestorm.se>
Date:   Fri Jan 10 15:59:01 2014 +0100

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.

(From OE-Core master rev: a5e6926cd409140d16391c72316da00ffbfe5429)

Signed-off-by: Anders Darander <anders at chargestorm.se>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>

---

 meta/classes/terminal.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index efbc4eb..2903666 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)
 



More information about the Openembedded-commits mailing list