diff options
author | Joe Slater <joe.slater@windriver.com> | 2021-08-12 15:59:31 -0700 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2021-08-23 15:46:51 +0800 |
commit | 48fe148e5ca344d2a6bad444ef48d9c5ea414448 (patch) | |
tree | b62194a71d40a2c557300e4e28c7deb406dd8435 /meta/classes/terminal.bbclass | |
parent | 09e238635c8d4cd595c2233a14c2ce1cbb9e5162 (diff) | |
download | openembedded-core-48fe148e5ca344d2a6bad444ef48d9c5ea414448.tar.gz |
terminal.bbclass: force bash for devshell
Since shell_trap_code in build.py sets /bin/sh as the interpreter
we will die a silent death if our environment contains things like
"export -f bodilyfunction" and /bin/sh is really /bin/dash.
Fixes this for the case of devshell.
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 23d296b3567aa31bad7b2a8558d4bd3e4505843b)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'meta/classes/terminal.bbclass')
-rw-r--r-- | meta/classes/terminal.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass index 6059ae95e0..a564ee7494 100644 --- a/meta/classes/terminal.bbclass +++ b/meta/classes/terminal.bbclass @@ -26,6 +26,9 @@ def emit_terminal_func(command, envdata, d): bb.utils.mkdirhier(os.path.dirname(runfile)) with open(runfile, 'w') as script: + # Override the shell shell_trap_code specifies. + # If our shell is bash, we might well face silent death. + script.write("#!/bin/bash\n") script.write(bb.build.shell_trap_code()) bb.data.emit_func(cmd_func, script, envdata) script.write(cmd_func) @@ -37,7 +40,7 @@ def emit_terminal_func(command, envdata, d): def oe_terminal(command, title, d): import oe.data import oe.terminal - + envdata = bb.data.init() for v in os.environ: |