[OE-core] [PATCH] autotools: don't output the full config.log on configure failure

Ross Burton ross.burton at intel.com
Wed Jan 13 21:47:12 UTC 2016


The config.log written by autoconf includes many pages of useless output,
followed by an obfuscated error message, and then more pages of every variable
that's been set.  It's only understandable if you're well versed in how autoconf
behaves, and often in simple failure modes doesn't actually make it clear what
the problem was.

Instead of outputting config.log to the console when do_configure() fails, just
use bbfatal_log so the human-readable configure output (not the config.log) is
shown to the user.

[ YOCTO #8856 ]

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/autotools.bbclass | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index d546a5c..99f64b8 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -86,14 +86,7 @@ oe_runconf () {
 	cfgscript="${CONFIGURE_SCRIPT}"
 	if [ -x "$cfgscript" ] ; then
 		bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-		set +e
-		${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
-		if [ "$?" != "0" ]; then
-			echo "Configure failed. The contents of all config.log files follows to aid debugging"
-			find ${B} -ignore_readdir_race -name config.log -print -exec cat {} \;
-			die "oe_runconf failed"
-		fi
-		set -e
+		${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal_log "configure failed"
 	else
 		bbfatal "no configure script found at $cfgscript"
 	fi
-- 
2.6.4




More information about the Openembedded-core mailing list