summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-02-26 14:35:13 +0000
committerMichał Górny <mgorny@gentoo.org>2013-02-26 14:35:13 +0000
commit7a5e4e58713699078cdd6afd5c4f2cc8fe9d12ab (patch)
tree15c29e6c48d8acc486b23624e1253c06da38a5e0 /eclass/python-r1.eclass
parentRe-use python_parallel_foreach_impl() in distutils-r1. (diff)
downloadgentoo-2-7a5e4e58713699078cdd6afd5c4f2cc8fe9d12ab.tar.gz
gentoo-2-7a5e4e58713699078cdd6afd5c4f2cc8fe9d12ab.tar.bz2
gentoo-2-7a5e4e58713699078cdd6afd5c4f2cc8fe9d12ab.zip
Re-enable split logs, now directly handled by python*_foreach_impl().
Diffstat (limited to 'eclass/python-r1.eclass')
-rw-r--r--eclass/python-r1.eclass18
1 files changed, 14 insertions, 4 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index ec75d4ab8331..310859ee36e0 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.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/python-r1.eclass,v 1.42 2013/02/26 14:33:45 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.43 2013/02/26 14:35:13 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -620,8 +620,17 @@ python_foreach_impl() {
local BUILD_DIR=${bdir%%/}-${impl}
export EPYTHON PYTHON
- einfo "${EPYTHON}: running ${@}"
- "${@}"
+ einfo "${EPYTHON}: running ${@}" \
+ | tee -a "${T}/build-${EPYTHON}.log"
+
+ # _python_parallel() does redirection internally.
+ # note: this is a hidden API to avoid writing python_foreach_impl
+ # twice. do *not* even think of using it anywhere else.
+ if [[ ${1} == _python_parallel ]]; then
+ "${@}"
+ else
+ "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
+ fi
lret=${?}
[[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
@@ -655,7 +664,8 @@ python_parallel_foreach_impl() {
_python_parallel() {
(
multijob_child_init
- "${@}"
+ "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
+ exit ${PIPESTATUS[0]}
) &
multijob_post_fork
}