Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog distutils-r1.eclass multilib-build.eclass python-r1.eclass
Date: Wed, 27 Feb 2013 21:03:05
Message-Id: 20130227210259.46AF72171D@flycatcher.gentoo.org
1 mgorny 13/02/27 21:02:59
2
3 Modified: ChangeLog distutils-r1.eclass multilib-build.eclass
4 python-r1.eclass
5 Log:
6 Revert the log teeing changes as they cause unexpected kind of breakage.
7
8 Revision Changes Path
9 1.692 eclass/ChangeLog
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.692&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.692&content-type=text/plain
13 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.691&r2=1.692
14
15 Index: ChangeLog
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
18 retrieving revision 1.691
19 retrieving revision 1.692
20 diff -u -r1.691 -r1.692
21 --- ChangeLog 26 Feb 2013 21:05:39 -0000 1.691
22 +++ ChangeLog 27 Feb 2013 21:02:59 -0000 1.692
23 @@ -1,6 +1,10 @@
24 # ChangeLog for eclass directory
25 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
26 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.691 2013/02/26 21:05:39 mgorny Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.692 2013/02/27 21:02:59 mgorny Exp $
28 +
29 + 27 Feb 2013; Michał Górny <mgorny@g.o> distutils-r1.eclass,
30 + multilib-build.eclass, python-r1.eclass:
31 + Revert the log teeing changes as they cause unexpected kind of breakage.
32
33 26 Feb 2013; Michał Górny <mgorny@g.o> multilib-build.eclass:
34 Run header checksumming function only if /usr/include exists (IOW: silence
35
36
37
38 1.57 eclass/distutils-r1.eclass
39
40 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?rev=1.57&view=markup
41 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?rev=1.57&content-type=text/plain
42 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?r1=1.56&r2=1.57
43
44 Index: distutils-r1.eclass
45 ===================================================================
46 RCS file: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v
47 retrieving revision 1.56
48 retrieving revision 1.57
49 diff -u -r1.56 -r1.57
50 --- distutils-r1.eclass 26 Feb 2013 14:34:32 -0000 1.56
51 +++ distutils-r1.eclass 27 Feb 2013 21:02:59 -0000 1.57
52 @@ -1,6 +1,6 @@
53 # Copyright 1999-2013 Gentoo Foundation
54 # Distributed under the terms of the GNU General Public License v2
55 -# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.56 2013/02/26 14:34:32 mgorny Exp $
56 +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.57 2013/02/27 21:02:59 mgorny Exp $
57
58 # @ECLASS: distutils-r1
59 # @MAINTAINER:
60 @@ -100,6 +100,14 @@
61 DEPEND=${PYTHON_DEPS}
62 fi
63
64 +# @ECLASS-VARIABLE: DISTUTILS_JOBS
65 +# @DEFAULT_UNSET
66 +# @DESCRIPTION:
67 +# The number of parallel jobs to run for distutils-r1 parallel builds.
68 +# If unset, the job-count in ${MAKEOPTS} will be used.
69 +#
70 +# This variable is intended to be set in make.conf.
71 +
72 # @ECLASS-VARIABLE: PATCHES
73 # @DEFAULT_UNSET
74 # @DESCRIPTION:
75 @@ -550,7 +558,16 @@
76
77 mkdir -p "${TMPDIR}" || die
78
79 - "${@}"
80 + if [[ ${DISTUTILS_NO_PARALLEL_BUILD} || ${DISTUTILS_SINGLE_IMPL} ]]
81 + then
82 + "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
83 + else
84 + (
85 + multijob_child_init
86 + "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
87 + ) &
88 + multijob_post_fork
89 + fi
90
91 if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
92 then
93 @@ -582,6 +599,39 @@
94 "${@}"
95 }
96
97 +# @FUNCTION: _distutils-r1_multijob_init
98 +# @INTERNAL
99 +# @DESCRIPTION:
100 +# Init multijob, taking the job-count from ${DISTUTILS_JOBS}.
101 +_distutils-r1_multijob_init() {
102 + debug-print-function ${FUNCNAME} "${@}"
103 +
104 + if [[ ! ${DISTUTILS_NO_PARALLEL_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
105 + then
106 + local opts
107 + if [[ ${DISTUTILS_JOBS} ]]; then
108 + opts=-j${DISTUTILS_JOBS}
109 + else
110 + opts=${MAKEOPTS}
111 + fi
112 +
113 + multijob_init "${opts}"
114 + fi
115 +}
116 +
117 +# @FUNCTION: _distutils-r1_multijob_finish
118 +# @INTERNAL
119 +# @DESCRIPTION:
120 +# Finish multijob if used.
121 +_distutils-r1_multijob_finish() {
122 + debug-print-function ${FUNCNAME} "${@}"
123 +
124 + if [[ ! ${DISTUTILS_NO_PARALLEL_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
125 + then
126 + multijob_finish
127 + fi
128 +}
129 +
130 # @FUNCTION: _distutils-r1_run_foreach_impl
131 # @INTERNAL
132 # @DESCRIPTION:
133 @@ -593,12 +643,9 @@
134 set -- distutils-r1_run_phase "${@}"
135
136 if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
137 - if [[ ${DISTUTILS_NO_PARALLEL_BUILD} || ${DISTUTILS_SINGLE_IMPL} ]]
138 - then
139 - python_foreach_impl "${@}"
140 - else
141 - python_parallel_foreach_impl "${@}"
142 - fi
143 + _distutils-r1_multijob_init
144 + python_foreach_impl "${@}"
145 + _distutils-r1_multijob_finish
146 else
147 if [[ ! ${EPYTHON} ]]; then
148 die "EPYTHON unset, python-single-r1_pkg_setup not called?!"
149
150
151
152 1.5 eclass/multilib-build.eclass
153
154 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.5&view=markup
155 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.5&content-type=text/plain
156 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?r1=1.4&r2=1.5
157
158 Index: multilib-build.eclass
159 ===================================================================
160 RCS file: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v
161 retrieving revision 1.4
162 retrieving revision 1.5
163 diff -u -r1.4 -r1.5
164 --- multilib-build.eclass 26 Feb 2013 21:05:39 -0000 1.4
165 +++ multilib-build.eclass 27 Feb 2013 21:02:59 -0000 1.5
166 @@ -1,6 +1,6 @@
167 # Copyright 1999-2013 Gentoo Foundation
168 # Distributed under the terms of the GNU General Public License v2
169 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.4 2013/02/26 21:05:39 mgorny Exp $
170 +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.5 2013/02/27 21:02:59 mgorny Exp $
171
172 # @ECLASS: multilib-build.eclass
173 # @MAINTAINER:
174 @@ -100,8 +100,7 @@
175 local ABI
176 for ABI in $(multilib_get_enabled_abis); do
177 multilib_toolchain_setup "${ABI}"
178 - local BUILD_DIR=${initial_dir%%/}-${ABI}
179 - "${@}" | tee -a "${T}/build-${ABI}.log"
180 + BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
181 done
182 }
183
184 @@ -128,8 +127,8 @@
185 multijob_child_init
186
187 multilib_toolchain_setup "${ABI}"
188 - local BUILD_DIR=${initial_dir%%/}-${ABI}
189 - "${@}" 2>&1 | tee -a "${T}/build-${ABI}.log"
190 + BUILD_DIR=${initial_dir%%/}-${ABI}
191 + "${@}"
192 ) &
193
194 multijob_post_fork
195
196
197
198 1.44 eclass/python-r1.eclass
199
200 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.44&view=markup
201 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.44&content-type=text/plain
202 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.43&r2=1.44
203
204 Index: python-r1.eclass
205 ===================================================================
206 RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
207 retrieving revision 1.43
208 retrieving revision 1.44
209 diff -u -r1.43 -r1.44
210 --- python-r1.eclass 26 Feb 2013 14:35:13 -0000 1.43
211 +++ python-r1.eclass 27 Feb 2013 21:02:59 -0000 1.44
212 @@ -1,6 +1,6 @@
213 # Copyright 1999-2013 Gentoo Foundation
214 # Distributed under the terms of the GNU General Public License v2
215 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.43 2013/02/26 14:35:13 mgorny Exp $
216 +# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.44 2013/02/27 21:02:59 mgorny Exp $
217
218 # @ECLASS: python-r1
219 # @MAINTAINER:
220 @@ -173,14 +173,6 @@
221 }
222 _python_set_globals
223
224 -# @ECLASS-VARIABLE: DISTUTILS_JOBS
225 -# @DEFAULT_UNSET
226 -# @DESCRIPTION:
227 -# The number of parallel jobs to run for distutils-r1 parallel builds.
228 -# If unset, the job-count in ${MAKEOPTS} will be used.
229 -#
230 -# This variable is intended to be set in make.conf.
231 -
232 # @FUNCTION: _python_validate_useflags
233 # @INTERNAL
234 # @DESCRIPTION:
235 @@ -620,17 +612,8 @@
236 local BUILD_DIR=${bdir%%/}-${impl}
237 export EPYTHON PYTHON
238
239 - einfo "${EPYTHON}: running ${@}" \
240 - | tee -a "${T}/build-${EPYTHON}.log"
241 -
242 - # _python_parallel() does redirection internally.
243 - # note: this is a hidden API to avoid writing python_foreach_impl
244 - # twice. do *not* even think of using it anywhere else.
245 - if [[ ${1} == _python_parallel ]]; then
246 - "${@}"
247 - else
248 - "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
249 - fi
250 + einfo "${EPYTHON}: running ${@}"
251 + "${@}"
252 lret=${?}
253
254 [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
255 @@ -640,53 +623,6 @@
256 return ${ret}
257 }
258
259 -# @FUNCTION: python_parallel_foreach_impl
260 -# @USAGE: <command> [<args>...]
261 -# @DESCRIPTION:
262 -# Run the given command for each of the enabled Python implementations.
263 -# If additional parameters are passed, they will be passed through
264 -# to the command.
265 -#
266 -# The function will return 0 status if all invocations succeed.
267 -# Otherwise, the return code from first failing invocation will
268 -# be returned.
269 -#
270 -# For each command being run, EPYTHON, PYTHON and BUILD_DIR are set
271 -# locally, and the former two are exported to the command environment.
272 -#
273 -# Multiple invocations of the command will be run in parallel, up to
274 -# DISTUTILS_JOBS (defaulting to '-j' option argument from MAKEOPTS).
275 -python_parallel_foreach_impl() {
276 - debug-print-function ${FUNCNAME} "${@}"
277 -
278 - local ret lret
279 -
280 - _python_parallel() {
281 - (
282 - multijob_child_init
283 - "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
284 - exit ${PIPESTATUS[0]}
285 - ) &
286 - multijob_post_fork
287 - }
288 -
289 - local opts
290 - if [[ ${DISTUTILS_JOBS} ]]; then
291 - opts=-j${DISTUTILS_JOBS}
292 - else
293 - opts=${MAKEOPTS}
294 - fi
295 -
296 - multijob_init "${opts}"
297 - python_foreach_impl _python_parallel "${@}"
298 - ret=${?}
299 - multijob_finish
300 - lret=${?}
301 -
302 - [[ ${ret} -eq 0 ]] && ret=${lret}
303 - return ${ret}
304 -}
305 -
306 # @FUNCTION: python_export_best
307 # @USAGE: [<variable>...]
308 # @DESCRIPTION: