Gentoo Archives: gentoo-commits

From: "James Le Cuirot (chewi)" <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog ant-tasks.eclass java-pkg-2.eclass java-utils-2.eclass
Date: Tue, 28 Apr 2015 20:35:52
Message-Id: 20150428203542.0D56E98E@oystercatcher.gentoo.org
1 chewi 15/04/28 20:35:40
2
3 Modified: ChangeLog ant-tasks.eclass java-pkg-2.eclass
4 java-utils-2.eclass
5 Log:
6 Skip java-dep-check for ant tasks wrt bug #298955. Fix missing
7 ant-core dependency SLOT. Fix recording of BUILD_DEPEND. Fix
8 java-pkg_ensure-dep matching and adjust the error message. Fix
9 automatic loading of ant-junit and junit wrt bug #513522 among others.
10
11 Revision Changes Path
12 1.1597 eclass/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1597&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1597&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1596&r2=1.1597
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
21 retrieving revision 1.1596
22 retrieving revision 1.1597
23 diff -u -r1.1596 -r1.1597
24 --- ChangeLog 28 Apr 2015 14:14:29 -0000 1.1596
25 +++ ChangeLog 28 Apr 2015 20:35:40 -0000 1.1597
26 @@ -1,6 +1,13 @@
27 # ChangeLog for eclass directory
28 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1596 2015/04/28 14:14:29 kensington Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1597 2015/04/28 20:35:40 chewi Exp $
31 +
32 + 28 Apr 2015; James Le Cuirot <chewi@g.o> java-pkg-2.eclass,
33 + java-utils-2.eclass, ant-tasks.eclass:
34 + Skip java-dep-check for ant tasks wrt bug #298955. Fix missing ant-core
35 + dependency SLOT. Fix recording of BUILD_DEPEND. Fix java-pkg_ensure-dep
36 + matching and adjust the error message. Fix automatic loading of ant-junit and
37 + junit wrt bug #513522 among others.
38
39 28 Apr 2015; Michael Palimaka <kensington@g.o> kde4-base.eclass:
40 Update SRC_URI.
41
42
43
44 1.17 eclass/ant-tasks.eclass
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ant-tasks.eclass?rev=1.17&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ant-tasks.eclass?rev=1.17&content-type=text/plain
48 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ant-tasks.eclass?r1=1.16&r2=1.17
49
50 Index: ant-tasks.eclass
51 ===================================================================
52 RCS file: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v
53 retrieving revision 1.16
54 retrieving revision 1.17
55 diff -u -r1.16 -r1.17
56 --- ant-tasks.eclass 5 Oct 2013 12:07:01 -0000 1.16
57 +++ ant-tasks.eclass 28 Apr 2015 20:35:40 -0000 1.17
58 @@ -1,9 +1,9 @@
59 # Eclass for building dev-java/ant-* packages
60 #
61 -# Copyright 1999-2013 Gentoo Foundation
62 +# Copyright 1999-2015 Gentoo Foundation
63 # Distributed under the terms of the GNU General Public License, v2 or later
64 # Author Vlastimil Babka <caster@g.o>
65 -# $Header: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v 1.16 2013/10/05 12:07:01 caster Exp $
66 +# $Header: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v 1.17 2015/04/28 20:35:40 chewi Exp $
67
68 # @ECLASS: ant-tasks.eclass
69 # @MAINTAINER:
70 @@ -98,7 +98,7 @@
71 LICENSE="Apache-2.0"
72 SLOT="0"
73
74 -RDEPEND="~dev-java/ant-core-${PV}"
75 +RDEPEND="~dev-java/ant-core-${PV}:0"
76 DEPEND="${RDEPEND}"
77
78 if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
79
80
81
82 1.40 eclass/java-pkg-2.eclass
83
84 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-pkg-2.eclass?rev=1.40&view=markup
85 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-pkg-2.eclass?rev=1.40&content-type=text/plain
86 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-pkg-2.eclass?r1=1.39&r2=1.40
87
88 Index: java-pkg-2.eclass
89 ===================================================================
90 RCS file: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v
91 retrieving revision 1.39
92 retrieving revision 1.40
93 diff -u -r1.39 -r1.40
94 --- java-pkg-2.eclass 21 Jul 2012 11:57:30 -0000 1.39
95 +++ java-pkg-2.eclass 28 Apr 2015 20:35:40 -0000 1.40
96 @@ -1,11 +1,11 @@
97 # Eclass for Java packages
98 #
99 # Copyright (c) 2004-2005, Thomas Matthijs <axxo@g.o>
100 -# Copyright (c) 2004-2011, Gentoo Foundation
101 +# Copyright (c) 2004-2015, Gentoo Foundation
102 #
103 # Licensed under the GNU General Public License, v2
104 #
105 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.39 2012/07/21 11:57:30 sera Exp $
106 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.40 2015/04/28 20:35:40 chewi Exp $
107
108 # @ECLASS: java-pkg-2.eclass
109 # @MAINTAINER:
110 @@ -123,33 +123,40 @@
111 [[ -e "${EANT_BUILD_XML:=build.xml}" ]] || return
112
113 if [[ ${EANT_TEST_TARGET} ]] || java-pkg-2_supports-test ${EANT_BUILD_XML}; then
114 - local opts task
115 + local opts task_re junit_re pkg
116
117 if [[ ${EANT_TEST_JUNIT_INTO} ]]; then
118 java-pkg_jar-from --into "${EANT_TEST_JUNIT_INTO}" junit
119 fi
120
121 + if [[ ${EANT_TEST_GENTOO_CLASSPATH} ]]; then
122 + EANT_GENTOO_CLASSPATH="${EANT_TEST_GENTOO_CLASSPATH}"
123 + fi
124 +
125 ANT_TASKS=${EANT_TEST_ANT_TASKS:-${ANT_TASKS:-${EANT_ANT_TASKS}}}
126
127 - if [[ ${DEPEND} = *dev-java/ant-junit* ]]; then
128 + task_re="\bdev-java/ant-junit(4)?(-[^:]+)?(:\S+)\b"
129 + junit_re="\bdev-java/junit(-[^:]+)?(:\S+)\b"
130 +
131 + if [[ ${DEPEND} =~ ${task_re} ]]; then
132 + pkg="ant-junit${BASH_REMATCH[1]}${BASH_REMATCH[3]}"
133 + pkg="${pkg%:0}"
134
135 if [[ ${ANT_TASKS} && "${ANT_TASKS}" != none ]]; then
136 - ANT_TASKS="${ANT_TASKS} ant-junit"
137 + ANT_TASKS="${ANT_TASKS} ${pkg}"
138 else
139 - ANT_TASKS="ant-junit"
140 + ANT_TASKS="${pkg}"
141 fi
142 + elif [[ ${DEPEND} =~ ${junit_re} ]]; then
143 + pkg="junit${BASH_REMATCH[2]}"
144 + pkg="${pkg%:0}"
145
146 - task=true
147 - fi
148 + opts="-Djunit.jar=\"$(java-pkg_getjar ${pkg} junit.jar)\""
149
150 - if [[ ${task} ]] || [[ ${DEPEND} = *dev-java/junit* ]]; then
151 - opts="-Djunit.jar=\"$(java-pkg_getjar junit junit.jar)\""
152 - if [[ ${EANT_TEST_GENTOO_CLASSPATH} ]]; then
153 - EANT_GENTOO_CLASSPATH="${EANT_TEST_GENTOO_CLASSPATH},junit"
154 - elif [[ ${EANT_GENTOO_CLASSPATH} ]]; then
155 - EANT_GENTOO_CLASSPATH+=',junit'
156 + if [[ ${EANT_GENTOO_CLASSPATH} ]]; then
157 + EANT_GENTOO_CLASSPATH+=",${pkg}"
158 else
159 - EANT_GENTOO_CLASSPATH=junit
160 + EANT_GENTOO_CLASSPATH="${pkg}"
161 fi
162 fi
163
164
165
166
167 1.159 eclass/java-utils-2.eclass
168
169 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?rev=1.159&view=markup
170 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?rev=1.159&content-type=text/plain
171 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?r1=1.158&r2=1.159
172
173 Index: java-utils-2.eclass
174 ===================================================================
175 RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
176 retrieving revision 1.158
177 retrieving revision 1.159
178 diff -u -r1.158 -r1.159
179 --- java-utils-2.eclass 14 Apr 2015 14:08:34 -0000 1.158
180 +++ java-utils-2.eclass 28 Apr 2015 20:35:40 -0000 1.159
181 @@ -6,7 +6,7 @@
182 #
183 # Licensed under the GNU General Public License, v2
184 #
185 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.158 2015/04/14 14:08:34 chewi Exp $
186 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.159 2015/04/28 20:35:40 chewi Exp $
187
188 # @ECLASS: java-utils-2.eclass
189 # @MAINTAINER:
190 @@ -920,7 +920,7 @@
191 java-pkg_record-jar_ --build-only "${target_pkg}" "${jar}"
192 fi
193 fi
194 - # otherwise, if the current jar is the target jar, link it
195 + # otherwise, if the current jar is the target jar, link it
196 elif [[ "${jar_name}" == "${target_jar}" ]] ; then
197 [[ -f "${destjar}" ]] && rm "${destjar}"
198 ln -snf "${jar}" "${destjar}" \
199 @@ -929,7 +929,7 @@
200 if [[ -z "${build_only}" ]]; then
201 java-pkg_record-jar_ "${target_pkg}" "${jar}"
202 else
203 - java-pkg_record-jar_ --build-only "${target_jar}" "${jar}"
204 + java-pkg_record-jar_ --build-only "${target_pkg}" "${jar}"
205 fi
206 fi
207 popd > /dev/null
208 @@ -1784,18 +1784,13 @@
209 # Don't call directly, but via java-pkg-2_pkg_preinst!
210 java-utils-2_pkg_preinst() {
211 if is-java-strict; then
212 + if [[ ! -e "${JAVA_PKG_ENV}" ]] || has ant-tasks ${INHERITED}; then
213 + return
214 + fi
215 +
216 if has_version dev-java/java-dep-check; then
217 - [[ -e "${JAVA_PKG_ENV}" ]] || return
218 local output=$(GENTOO_VM= java-dep-check --image "${D}" "${JAVA_PKG_ENV}")
219 - if [[ ${output} && has_version <=dev-java/java-dep-check-0.2 ]]; then
220 - ewarn "Possibly unneeded dependencies found in package.env:"
221 - for dep in ${output}; do
222 - ewarn "\t${dep}"
223 - done
224 - fi
225 - if [[ ${output} && has_version >dev-java/java-dep-check-0.2 ]]; then
226 - ewarn "${output}"
227 - fi
228 + [[ ${output} ]] && ewarn "${output}"
229 else
230 eerror "Install dev-java/java-dep-check for dependency checking"
231 fi
232 @@ -1909,8 +1904,10 @@
233
234 if [[ ${EBUILD_PHASE} = "test" ]]; then
235 antflags="${antflags} -DJunit.present=true"
236 - [[ ${ANT_TASKS} = *ant-junit* ]] && gcp="${gcp} junit"
237 getjarsarg="--with-dependencies"
238 +
239 + local re="\bant-junit4?([-:]\S+)?\b"
240 + [[ ${ANT_TASKS} =~ ${re} ]] && gcp+=" ${BASH_REMATCH[0]}"
241 else
242 antflags="${antflags} -Dmaven.test.skip=true"
243 fi
244 @@ -2673,7 +2670,8 @@
245 # @INTERNAL
246 # @DESCRIPTION:
247 # Check that a package being used in jarfrom, getjars and getjar is contained
248 -# within DEPEND or RDEPEND.
249 +# within DEPEND or RDEPEND with the correct SLOT. See this mail for details:
250 +# https://archives.gentoo.org/gentoo-dev/message/dcb644f89520f4bbb61cc7bbe45fdf6e
251 # @CODE
252 # Parameters:
253 # $1 - empty - check both vars; "runtime" or "build" - check only
254 @@ -2695,9 +2693,10 @@
255 # * The target package first has any dots escaped, e.g. foo-1.2
256 # becomes foo-1\.2.
257 #
258 - # * sed then looks at the component following the last - character,
259 - # or the whole string if there is no - character. It uses this to
260 - # build a new regexp with two significant branches.
261 + # * sed then looks at the component following the last - or :
262 + # character, or the whole string if there is no - or :
263 + # character. It uses this to build a new regexp with two
264 + # significant branches.
265 #
266 # * The first checks for the whole target package string, optionally
267 # followed by a version number, and then :0.
268 @@ -2706,36 +2705,36 @@
269 # string, optionally followed by a version number, followed by the
270 # aforementioned component, treating that as a SLOT.
271 #
272 - local stripped_pkg=/$(sed -r 's/-?([^-]+)$/(\0(-[^:]+)?:0|(-[^:]+)?:\1)/' <<< "${target_pkg//./\\.}")\\b
273 + local stripped_pkg=/$(sed -r 's/[-:]?([^-:]+)$/(\0(-[^:]+)?:0|(-[^:]+)?:\1)/' <<< "${target_pkg//./\\.}")\\b
274
275 debug-print "Matching against: ${stripped_pkg}"
276
277 + # Uncomment the lines below once we've dealt with more of these
278 + # otherwise we'll be tempted to turn JAVA_PKG_STRICT off while
279 + # getting hit with a wave of bug reports. :(
280 +
281 if [[ ${limit_to} != runtime && ! ( "${DEPEND}" =~ $stripped_pkg ) ]]; then
282 dev_error="The ebuild is attempting to use ${target_pkg}, which is not "
283 dev_error+="declared with a SLOT in DEPEND."
284 - if is-java-strict; then
285 - die "${dev_error}"
286 - else
287 - eqawarn "${dev_error}"
288 - # Uncomment this once we've dealt with more of these or
289 - # we'll get hit with a wave of bug reports. :(
290 +# if is-java-strict; then
291 +# die "${dev_error}"
292 +# else
293 + eqawarn "java-pkg_ensure-dep: ${dev_error}"
294 # eerror "Because you have ${target_pkg} installed,"
295 # eerror "the package will build without problems, but please"
296 # eerror "report this to http://bugs.gentoo.org."
297 - fi
298 +# fi
299 elif [[ ${limit_to} != build && ! ( "${RDEPEND}${PDEPEND}" =~ ${stripped_pkg} ) ]]; then
300 dev_error="The ebuild is attempting to use ${target_pkg}, which is not "
301 dev_error+="declared with a SLOT in [RP]DEPEND and --build-only wasn't given."
302 - if is-java-strict; then
303 - die "${dev_error}"
304 - else
305 - eqawarn "${dev_error}"
306 - # Uncomment this once we've dealt with more of these or
307 - # we'll get hit with a wave of bug reports. :(
308 +# if is-java-strict; then
309 +# die "${dev_error}"
310 +# else
311 + eqawarn "java-pkg_ensure-dep: ${dev_error}"
312 # eerror "The package will build without problems, but may fail to run"
313 # eerror "if you don't have ${target_pkg} installed,"
314 # eerror "so please report this to http://bugs.gentoo.org."
315 - fi
316 +# fi
317 fi
318 }