All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: openembedded-core@lists.openembedded.org,
	Hongxu Jia <hongxu.jia@windriver.com>
Subject: [PATCH] Revert "terminal.bbclass: use var-SHELL as the shebang of wrapper script"
Date: Sun, 25 Nov 2018 02:11:55 +0100	[thread overview]
Message-ID: <20181125011155.16251-1-pkj@axis.com> (raw)

The $SHELL environment variable is used for the user's preferred
interactive shell. This shall not be used when executing shell scripts
that expect POSIX shell syntax as there is no guarantee that it is a
POSIX compatible shell.

This reverts commit 27e2ede65f1193e49f9483b08a55495d88740a65.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

In my case, $SHELL is set to /bin/zsh, with the result that devshell
fails to start. If there is some problem with devshell related to
/bin/sh being linked to dash rather than bash (which the original
commit indicates), then that should be adressed instead.

Hongxu: Do you have any additional information related to why you made
the change in the first place?

 meta/classes/terminal.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 73e765d57a..a27e10c6ec 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -25,8 +25,7 @@ def emit_terminal_func(command, envdata, d):
     bb.utils.mkdirhier(os.path.dirname(runfile))
 
     with open(runfile, 'w') as script:
-        script.write('#!/usr/bin/env %s\n' % d.getVar('SHELL'))
-        script.write('set -e\n')
+        script.write('#!/bin/sh -e\n')
         bb.data.emit_func(cmd_func, script, envdata)
         script.write(cmd_func)
         script.write("\n")
-- 
2.12.0



             reply	other threads:[~2018-11-25  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-25  1:11 Peter Kjellerstedt [this message]
2018-11-26  1:51 ` [PATCH] Revert "terminal.bbclass: use var-SHELL as the shebang of wrapper script" Hongxu Jia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181125011155.16251-1-pkj@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=hongxu.jia@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.