summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-01-12 20:45:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:20 +0000
commitba837f10555998a8677eb99bfc6698e0cc1f7942 (patch)
tree3d99cf3e2e96a53da48de8186f1be9c7527e4a36
parent3e3cb6207b07b4e9f15c621e2851c8950b724215 (diff)
downloadpoky-ba837f10555998a8677eb99bfc6698e0cc1f7942.tar.gz
autotools: don't output the full config.log on configure failure
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 the whole config.log to the console when do_configure() fails, use bbfatal_log so the human-readable configure output (not the config.log) is shown to the user, and tell the user where config.log can be found if they need it. [ YOCTO #8856 ] (From OE-Core rev: 55e263c559098cce99d8c3ef57ccc39f1d4a6848) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/autotools.bbclass11
1 files changed, 4 insertions, 7 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 44cb422584..1400b44999 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -88,14 +88,11 @@ oe_runconf () {
88 cfgscript=`python -c "import os; print os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.')"`/$cfgscript_name 88 cfgscript=`python -c "import os; print os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.')"`/$cfgscript_name
89 if [ -x "$cfgscript" ] ; then 89 if [ -x "$cfgscript" ] ; then
90 bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@" 90 bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
91 set +e 91 if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
92 ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" 92 bbnote "The following config.log files may provide further information."
93 if [ "$?" != "0" ]; then 93 bbnote `find ${B} -ignore_readdir_race -type f -name config.log`
94 echo "Configure failed. The contents of all config.log files follows to aid debugging" 94 bbfatal_log "configure failed"
95 find ${B} -ignore_readdir_race -name config.log -print -exec cat {} \;
96 die "oe_runconf failed"
97 fi 95 fi
98 set -e
99 else 96 else
100 bbfatal "no configure script found at $cfgscript" 97 bbfatal "no configure script found at $cfgscript"
101 fi 98 fi