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 python-r1.eclass
Date: Tue, 26 Feb 2013 14:32:54
Message-Id: 20130226143249.58D2C2171D@flycatcher.gentoo.org
1 mgorny 13/02/26 14:32:49
2
3 Modified: ChangeLog python-r1.eclass
4 Log:
5 Make python_foreach_impl() non-fatal, expect explicit die inside or outside.
6
7 Revision Changes Path
8 1.685 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.685&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.685&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.684&r2=1.685
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.684
18 retrieving revision 1.685
19 diff -u -r1.684 -r1.685
20 --- ChangeLog 25 Feb 2013 20:27:27 -0000 1.684
21 +++ ChangeLog 26 Feb 2013 14:32:49 -0000 1.685
22 @@ -1,6 +1,9 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.684 2013/02/25 20:27:27 mgorny Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.685 2013/02/26 14:32:49 mgorny Exp $
27 +
28 + 26 Feb 2013; Michał Górny <mgorny@g.o> python-r1.eclass:
29 + Make python_foreach_impl() non-fatal, expect explicit die inside or outside.
30
31 25 Feb 2013; Michał Górny <mgorny@g.o> xorg-2.eclass:
32 Bump the emul-linux-x86 blocker to match the new release.
33
34
35
36 1.41 eclass/python-r1.eclass
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.41&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.41&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.40&r2=1.41
41
42 Index: python-r1.eclass
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
45 retrieving revision 1.40
46 retrieving revision 1.41
47 diff -u -r1.40 -r1.41
48 --- python-r1.eclass 30 Jan 2013 10:42:25 -0000 1.40
49 +++ python-r1.eclass 26 Feb 2013 14:32:49 -0000 1.41
50 @@ -1,6 +1,6 @@
51 # Copyright 1999-2013 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.40 2013/01/30 10:42:25 mgorny Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.41 2013/02/26 14:32:49 mgorny Exp $
55
56 # @ECLASS: python-r1
57 # @MAINTAINER:
58 @@ -583,8 +583,11 @@
59 # @DESCRIPTION:
60 # Run the given command for each of the enabled Python implementations.
61 # If additional parameters are passed, they will be passed through
62 -# to the command. If the command fails, python_foreach_impl dies.
63 -# If necessary, use ':' to force a successful return.
64 +# to the command.
65 +#
66 +# The function will return 0 status if all invocations succeed.
67 +# Otherwise, the return code from first failing invocation will
68 +# be returned.
69 #
70 # For each command being run, EPYTHON, PYTHON and BUILD_DIR are set
71 # locally, and the former two are exported to the command environment.
72 @@ -596,6 +599,7 @@
73
74 local impl
75 local bdir=${BUILD_DIR:-${S}}
76 + local ret=0 lret=0
77
78 debug-print "${FUNCNAME}: bdir = ${bdir}"
79 for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
80 @@ -609,9 +613,14 @@
81 export EPYTHON PYTHON
82
83 einfo "${EPYTHON}: running ${@}"
84 - "${@}" || die "${EPYTHON}: ${1} failed"
85 + "${@}"
86 + lret=${?}
87 +
88 + [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
89 fi
90 done
91 +
92 + return ${ret}
93 }
94
95 # @FUNCTION: python_export_best