Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] autogen-native: allow user to set POSIX_SHELL as desired
@ 2017-05-18  6:50 Awais Belal
  2017-05-18  7:23 ` Robert Yang
  0 siblings, 1 reply; 8+ messages in thread
From: Awais Belal @ 2017-05-18  6:50 UTC (permalink / raw)
  To: openembedded-core

Using 'test -x' is only viable in situations where
POSIX_SHELL is directly set to an executable whereas
there are scenarios where a user might want to set
it to "env sh" so that it can be used in places
where there's a problem with shebang lengths etc. This
is exactly how it is being used in OE so build failures
are seen in cases where deep directory hierarchies are
used for the builddir.
We now use 'test -n' just to make sure if POSIX_SHELL
is set by the user or not and then move forward to
other tests in case it is unset.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
 .../autogen/autogen-native_5.18.12.bb              |  1 +
 ...pts-allow-user-to-set-POSIX_SHELL-as-desi.patch | 37 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-devtools/autogen/autogen/0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch

diff --git a/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb b/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
index 853477cf7c..37571e3358 100644
--- a/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
+++ b/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
            file://fix-script-err-when-processing-libguile.patch \
            file://0001-config-libopts.m4-regenerate-it-from-config-libopts..patch \
            file://0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch \
+           file://0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch \
 "
 
 SRC_URI[md5sum] = "551d15ccbf5b5fc5658da375d5003389"
diff --git a/meta/recipes-devtools/autogen/autogen/0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch b/meta/recipes-devtools/autogen/autogen/0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch
new file mode 100644
index 0000000000..bfbf6621e1
--- /dev/null
+++ b/meta/recipes-devtools/autogen/autogen/0001-config-libopts-allow-user-to-set-POSIX_SHELL-as-desi.patch
@@ -0,0 +1,37 @@
+From dfb30e438a051993c69357c5069170ec779e91e4 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_belal@mentor.com>
+Date: Wed, 17 May 2017 15:06:48 +0500
+Subject: [PATCH] config/libopts: allow user to set POSIX_SHELL as desired
+
+Using 'test -x' is only viable in situations where
+POSIX_SHELL is directly set to an executable whereas
+there are scenarios where a user might want to set
+it to "env sh" so that it can be used in places
+where there's a problem with shebang lengths etc.
+We now use 'test -n' just to make sure if POSIX_SHELL
+is set by the user or not and then move forward to
+other tests in case it is unset.
+
+Upstream-Status: Pending
+
+Signed-off-by: Awais Belal <awais_belal@mentor.com>
+---
+ config/libopts.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config/libopts.m4 b/config/libopts.m4
+index 51e6a39..efabc7f 100644
+--- a/config/libopts.m4
++++ b/config/libopts.m4
+@@ -114,7 +114,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
+   AC_PROG_SED
+   [while :
+   do
+-      test -x "$POSIX_SHELL" && break
++      test -n "$POSIX_SHELL" && break
+       POSIX_SHELL=`which bash`
+       test -x "$POSIX_SHELL" && break
+       POSIX_SHELL=`which dash`
+-- 
+2.11.1
+
-- 
2.11.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-18 14:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18  6:50 [PATCH] autogen-native: allow user to set POSIX_SHELL as desired Awais Belal
2017-05-18  7:23 ` Robert Yang
2017-05-18  8:36   ` Alexander Kanavin
2017-05-18 11:23     ` Belal, Awais
2017-05-18 12:32       ` Alexander Kanavin
2017-05-18 13:20         ` Belal, Awais
2017-05-18 13:24           ` Alexander Kanavin
2017-05-18 14:24             ` Belal, Awais

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox