1 |
This provides the split logs accessible to every Python package, not |
2 |
only ones using distutils. |
3 |
--- |
4 |
gx86/eclass/python-r1.eclass | 16 +++++++++++++--- |
5 |
1 file changed, 13 insertions(+), 3 deletions(-) |
6 |
|
7 |
diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass |
8 |
index 09e6417..1b26513 100644 |
9 |
--- a/gx86/eclass/python-r1.eclass |
10 |
+++ b/gx86/eclass/python-r1.eclass |
11 |
@@ -620,8 +620,17 @@ python_foreach_impl() { |
12 |
local BUILD_DIR=${bdir%%/}-${impl} |
13 |
export EPYTHON PYTHON |
14 |
|
15 |
- einfo "${EPYTHON}: running ${@}" |
16 |
- "${@}" |
17 |
+ einfo "${EPYTHON}: running ${@}" \ |
18 |
+ | tee -a "${T}/build-${EPYTHON}.log" |
19 |
+ |
20 |
+ # _python_parallel() does redirection internally. |
21 |
+ # note: this is a hidden API to avoid writing python_foreach_impl |
22 |
+ # twice. do *not* even think of using it anywhere else. |
23 |
+ if [[ ${1} == _python_parallel ]]; then |
24 |
+ "${@}" |
25 |
+ else |
26 |
+ "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log" |
27 |
+ fi |
28 |
lret=${?} |
29 |
|
30 |
[[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret} |
31 |
@@ -655,7 +664,8 @@ python_parallel_foreach_impl() { |
32 |
_python_parallel() { |
33 |
( |
34 |
multijob_child_init |
35 |
- "${@}" |
36 |
+ "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log" |
37 |
+ exit ${PIPESTATUS[0]} |
38 |
) & |
39 |
multijob_post_fork |
40 |
} |
41 |
-- |
42 |
1.8.1.2 |