All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] autotools.bbclass: When configure fails, dump the config.log files the logs
@ 2012-07-02 15:35 Richard Purdie
  2012-07-02 16:49 ` Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2012-07-02 15:35 UTC (permalink / raw)
  To: openembedded-core

When configure fails, it usually says "see config.log" yet nobody ever shares
the config.log file meaning the person trying to help invariably has to ask
for more information.

This patch dumps all the config.log files into the main bitbake log files when
configure fails, meaning all the information is present to help someone debug
such failures. It does make the log rather larger but this is preferable to
not having enough information in most cases.

[YOCTO #2463]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 9b36f3c..02b984d 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -74,7 +74,14 @@ oe_runconf () {
 	cfgscript="${S}/configure"
 	if [ -x "$cfgscript" ] ; then
 		bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-		${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
+		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 ${S} -name config.log -print -exec cat {} \;
+			bbfatal "oe_runconf failed"
+		fi
+		set -e
 	else
 		bbfatal "no configure script found at $cfgscript"
 	fi





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] autotools.bbclass: When configure fails, dump the config.log files the logs
  2012-07-02 15:35 [PATCH] autotools.bbclass: When configure fails, dump the config.log files the logs Richard Purdie
@ 2012-07-02 16:49 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2012-07-02 16:49 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, Jul 2, 2012 at 8:35 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> When configure fails, it usually says "see config.log" yet nobody ever shares
> the config.log file meaning the person trying to help invariably has to ask
> for more information.
>
> This patch dumps all the config.log files into the main bitbake log files when
> configure fails, meaning all the information is present to help someone debug
> such failures. It does make the log rather larger but this is preferable to
> not having enough information in most cases.

thats really a good improvement.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-02 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 15:35 [PATCH] autotools.bbclass: When configure fails, dump the config.log files the logs Richard Purdie
2012-07-02 16:49 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.