summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-03-10 21:44:01 +0000
committerMichał Górny <mgorny@gentoo.org>2013-03-10 21:44:01 +0000
commitd98343d7be7b884a3ce4ea397747e945d8ba0c25 (patch)
tree390e91ba7a67783762099be4826925f2fa95f12c /eclass/multibuild.eclass
parentUse functions from readme.gentoo.eclass instead of elog. (diff)
downloadhistorical-d98343d7be7b884a3ce4ea397747e945d8ba0c25.tar.gz
historical-d98343d7be7b884a3ce4ea397747e945d8ba0c25.tar.bz2
historical-d98343d7be7b884a3ce4ea397747e945d8ba0c25.zip
Make the log output redirection much simpler. Fix bash-3.2 compatibility.
Diffstat (limited to 'eclass/multibuild.eclass')
-rw-r--r--eclass/multibuild.eclass18
1 files changed, 4 insertions, 14 deletions
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 193c20a4411e..a3f1402088ab 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.7 2013/03/10 21:00:29 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.8 2013/03/10 21:44:01 mgorny Exp $
# @ECLASS: multibuild
# @MAINTAINER:
@@ -113,11 +113,6 @@ multibuild_foreach_variant() {
local MULTIBUILD_VARIANT=${v}
local MULTIBUILD_ID=${prev_id}${v}
local BUILD_DIR=${bdir%%/}-${v}
- local log_fd
-
- # redirect_alloc_fd accepts files only. so we need to open
- # a random file and then reuse the fd for logger process.
- redirect_alloc_fd log_fd /dev/null
_multibuild_run() {
# find the first non-private command
@@ -130,14 +125,9 @@ multibuild_foreach_variant() {
"${@}"
}
- # bash can't handle ${log_fd} in redirections,
- # we need to use eval to pass fd numbers directly.
- eval "
- exec ${log_fd}> >(exec tee -a \"\${T}/build-\${MULTIBUILD_ID}.log\")
- _multibuild_run \"\${@}\" >&${log_fd} 2>&1
- lret=\${?}
- exec ${log_fd}>&-
- "
+ _multibuild_run "${@}" \
+ > >(exec tee -a "${T}/build-${MULTIBUILD_ID}.log") 2>&1
+ lret=${?}
done
[[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}