summaryrefslogtreecommitdiff
path: root/eclass
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
commitb9fc78aadc24349cec2058fd909117670f035ccf (patch)
treead9aca8e6e6010e1d01c6e5f91ac3000254d0bcb /eclass
parentRe-use python_parallel_foreach_impl() in distutils-r1. (diff)
downloadhistorical-b9fc78aadc24349cec2058fd909117670f035ccf.tar.gz
historical-b9fc78aadc24349cec2058fd909117670f035ccf.tar.bz2
historical-b9fc78aadc24349cec2058fd909117670f035ccf.zip
Re-enable split logs, now directly handled by python*_foreach_impl().
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/python-r1.eclass18
2 files changed, 18 insertions, 5 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index a9d52f603659..80eb7c8d9a1a 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.687 2013/02/26 14:34:32 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.688 2013/02/26 14:35:13 mgorny Exp $
+
+ 26 Feb 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Re-enable split logs, now directly handled by python*_foreach_impl().
26 Feb 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
Re-use python_parallel_foreach_impl() in distutils-r1.
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
}