Skip to contentSkip to conversation

autotools: CONFIG_SHELL defaults

PATCH New Andrej Valek 1 participant 1 message Nov 4, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autotools: CONFIG_SHELL defaults

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.

---
 meta/classes/autotools.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/autotools.bbclass +1 -1
index 70804b82b4..2ceb790b5c 100644
@@ -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"
Signature · 1 line
2.11.0