]> code.ossystems Code Review - openembedded-core.git/commitdiff
autotools: Give in and force CONFIG_SHELL to bash
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jan 2020 17:37:16 +0000 (17:37 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Jan 2020 11:10:35 +0000 (11:10 +0000)
At present, CONFIG_SHELL becomes /bin/sh if its bash and /bin/bash if not. This
isn't deterministic and leads to changes in ptest packages which include Makefiles.

At first glance you'd think we'd hardcode to /bin/sh since most system shells are sane.

Sadly the dash vs. bash leads to quoting differences in configure.

The bash default is probably the safest option since configure tries to find bash
and this is what most systems would end up using.

The end result is a more consisent build environment.

[YOCTO #13752]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/autotools.bbclass

index 3d22ad02557e96e46495dd14eb0d6f3b6a7c1b76..6c2a33ac72fe18a51e37fb6c9e6f2f4da4f450e1 100644 (file)
@@ -90,7 +90,7 @@ oe_runconf () {
        cfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name
        if [ -x "$cfgscript" ] ; then
                bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-               if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
+               if ! ${CACHED_CONFIGUREVARS} CONFIG_SHELL=/bin/bash $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
                        bbnote "The following config.log files may provide further information."
                        bbnote `find ${B} -ignore_readdir_race -type f -name config.log`
                        bbfatal_log "configure failed"