summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-05-04 22:27:05 +0000
committerMike Frysinger <vapier@gentoo.org>2009-05-04 22:27:05 +0000
commit2fdfa8a1f7c71b5dd92a91d12527bb719491248b (patch)
tree2cdbf15b5ddecb9718df542f59062891e1ee5384 /eclass
parentstable sparc, bug 268178 (diff)
downloadgentoo-2-2fdfa8a1f7c71b5dd92a91d12527bb719491248b.tar.gz
gentoo-2-2fdfa8a1f7c71b5dd92a91d12527bb719491248b.tar.bz2
gentoo-2-2fdfa8a1f7c71b5dd92a91d12527bb719491248b.zip
simplify log handling in autotools_run_tool and include the pwd in the log header
Diffstat (limited to 'eclass')
-rw-r--r--eclass/autotools.eclass21
1 files changed, 12 insertions, 9 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index de5e1ec04bc9..b27d4af5c27a 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.84 2009/04/12 07:38:33 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.85 2009/05/04 22:27:05 vapier Exp $
# @ECLASS: autotools.eclass
# @MAINTAINER:
@@ -241,23 +241,26 @@ autotools_run_tool() {
ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase"
fi
- local STDERR_TARGET="${T}/$$.out"
- local ris
+ local STDERR_TARGET="${T}/$1.out"
+ # most of the time, there will only be one run, but if there are
+ # more, make sure we get unique log filenames
+ if [[ -e ${STDERR_TARGET} ]] ; then
+ STDERR_TARGET="${T}/$1-$$.out"
+ fi
- printf "***** $1 *****\n***** $*\n\n" > "${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}"
+ printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}"
ebegin "Running $@"
- "$@" >> "${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}" 2>&1
- ris=$?
- eend ${ris}
+ "$@" >> "${STDERR_TARGET}" 2>&1
+ eend $?
- if [[ ${ris} != 0 && ${NO_FAIL} != 1 ]]; then
+ if [[ $? != 0 && ${NO_FAIL} != 1 ]] ; then
echo
eerror "Failed Running $1 !"
eerror
eerror "Include in your bugreport the contents of:"
eerror
- eerror " ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}"
+ eerror " ${STDERR_TARGET}"
echo
die "Failed Running $1 !"
fi