]> code.ossystems Code Review - openembedded-core.git/commitdiff
autotools: CONFIG_SHELL defaults
authorAndrej Valek <andrej.valek@siemens.com>
Wed, 4 Nov 2020 13:35:33 +0000 (14:35 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 8 Nov 2020 14:03:16 +0000 (14:03 +0000)
Do not hard-code default shell to /bin/bash even if CONFIG_SHELL is already
set to other shell, but keep /bin/bash as a default. This will fix a shadow
issue, where CONFIG_SHELL is exported to /bin/sh, but /bin/bash is used
even if it's not installed.

Signed-off-by: Andrej Kozemcak <andrej.kozemcak@siemens.com>
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/autotools.bbclass

index 70804b82b4dac244ffb1935ff381193ae4dfd1cb..2ceb790b5cfb4e39ac017239a17aac5f52c48c40 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 ! CONFIG_SHELL=/bin/bash ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
+               if ! CONFIG_SHELL=${CONFIG_SHELL-/bin/bash} ${CACHED_CONFIGUREVARS} $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"