summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-08-07 22:53:28 +0000
committerMike Frysinger <vapier@gentoo.org>2011-08-07 22:53:28 +0000
commit55056b03d786eaf549527f331ed064208b2cfc79 (patch)
tree98d04a843c4b9067ceda67c0ab23325f29cddfe6 /eclass
parentVersion bump and remove old. (diff)
downloadgentoo-2-55056b03d786eaf549527f331ed064208b2cfc79.tar.gz
gentoo-2-55056b03d786eaf549527f331ed064208b2cfc79.tar.bz2
gentoo-2-55056b03d786eaf549527f331ed064208b2cfc79.zip
make sure log output is unique #378057 by Martin von Gagern
Diffstat (limited to 'eclass')
-rw-r--r--eclass/autotools.eclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index fc72eb7d2038..2c433ffd5676 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.103 2011/05/16 03:44:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.104 2011/08/07 22:53:28 vapier Exp $
# @ECLASS: autotools.eclass
# @MAINTAINER:
@@ -287,7 +287,12 @@ autotools_run_tool() {
# 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"
+ local i=1
+ while :; do
+ STDERR_TARGET="${T}/$1-${i}.out"
+ [[ -e ${STDERR_TARGET} ]] || break
+ : $(( i++ ))
+ done
fi
printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}"