Gentoo Archives: gentoo-commits

From: "Vlastimil Babka (caster)" <caster@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: java-ant-2.eclass java-utils-2.eclass
Date: Sat, 12 Jan 2008 15:08:51
Message-Id: E1JDhyZ-0007fI-Se@stork.gentoo.org
1 caster 08/01/12 15:08:47
2
3 Modified: java-ant-2.eclass java-utils-2.eclass
4 Log:
5 Make ANT_TASKS="none" the new default, bug #203750.
6
7 Revision Changes Path
8 1.25 eclass/java-ant-2.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-ant-2.eclass?rev=1.25&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-ant-2.eclass?rev=1.25&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-ant-2.eclass?r1=1.24&r2=1.25
13
14 Index: java-ant-2.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v
17 retrieving revision 1.24
18 retrieving revision 1.25
19 diff -u -r1.24 -r1.25
20 --- java-ant-2.eclass 18 Dec 2007 00:23:06 -0000 1.24
21 +++ java-ant-2.eclass 12 Jan 2008 15:08:47 -0000 1.25
22 @@ -14,7 +14,7 @@
23 #
24 # Licensed under the GNU General Public License, v2
25 #
26 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.24 2007/12/18 00:23:06 betelgeuse Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.25 2008/01/12 15:08:47 caster Exp $
28
29 inherit java-utils-2
30
31 @@ -30,16 +30,6 @@
32 #WANT_ANT_TASKS
33
34 # -----------------------------------------------------------------------------
35 -# @variable-preinherit WANT_SPLIT_ANT
36 -# @variable-default ""
37 -#
38 -# If set, ant-core dependency specifies version with startup script that
39 -# honours ANT_TASKS variable, i.e. >=1.7.0. Using WANT_ANT_TASKS implies
40 -# split-ant already, so you need this only if you manually depend on some
41 -# external package providing ant tasks and want to use it via ANT_TASKS.
42 -[[ -n "${WANT_ANT_TASKS}" ]] && WANT_SPLIT_ANT="true"
43 -
44 -# -----------------------------------------------------------------------------
45 # @variable-preinherit JAVA_ANT_DISABLE_ANT_CORE_DEP
46 # @variable-default unset for java-pkg-2, true for java-pkg-opt-2
47 #
48 @@ -48,13 +38,9 @@
49
50 # construct ant-speficic DEPEND
51 JAVA_ANT_E_DEPEND=""
52 -# add ant-core into DEPEND, unless disabled; respect WANT_SPLIT_ANT
53 +# add ant-core into DEPEND, unless disabled
54 if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then
55 - if [[ -n "${WANT_SPLIT_ANT}" ]]; then
56 JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.7.0"
57 - else
58 - JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} dev-java/ant-core"
59 - fi
60 fi
61
62 # add ant tasks specified in WANT_ANT_TASKS to DEPEND
63
64
65
66 1.103 eclass/java-utils-2.eclass
67
68 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?rev=1.103&view=markup
69 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?rev=1.103&content-type=text/plain
70 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?r1=1.102&r2=1.103
71
72 Index: java-utils-2.eclass
73 ===================================================================
74 RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
75 retrieving revision 1.102
76 retrieving revision 1.103
77 diff -u -r1.102 -r1.103
78 --- java-utils-2.eclass 12 Jan 2008 15:04:26 -0000 1.102
79 +++ java-utils-2.eclass 12 Jan 2008 15:08:47 -0000 1.103
80 @@ -6,7 +6,7 @@
81 #
82 # Licensed under the GNU General Public License, v2
83 #
84 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.102 2008/01/12 15:04:26 caster Exp $
85 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.103 2008/01/12 15:08:47 caster Exp $
86
87 # -----------------------------------------------------------------------------
88 # @eclass-begin
89 @@ -1724,41 +1724,6 @@
90 }
91
92 # ------------------------------------------------------------------------------
93 -# @internal-function java-pkg_ant-tasks-from-deps
94 -#
95 -# Function to determine ANT_TASKS from DEPEND variable for backwards
96 -# compatibility with ebuilds that don't set ANT_TASKS before calling eant() or
97 -# WANT_ANT_TASKS before inheriting java-pkg-2. If the DEPEND string contains
98 -# "dev-java/ant" or "dev-java/ant-tasks", then it returns "all", otherwise
99 -# "none". It's not smart enough to cope with USE flag depends but that shouldn't
100 -# be a problem, the worst it can do is activace all tasks when not needed.
101 -# Note that this is called only with JAVA_PKG_STRICT=1, to find ebuilds with
102 -# insufficient dependencies, otherwise all available tasks are used for
103 -# backwards compatilbility.
104 -#
105 -# @return "all" or "none"
106 -# ------------------------------------------------------------------------------
107 -java-pkg_ant-tasks-from-deps() {
108 - local found_ant found_ant_tasks
109 -
110 - for dep in ${DEPEND}
111 - do
112 - local ant="$(awk '/(dev-java\/ant)/ { if (match($1, "(dev-java/ant)((-[0-9])+|$)", m)) print m[1] }' <<< ${dep})"
113 - [[ "${ant}" == "dev-java/ant" ]] && found_ant=true
114 - [[ "${dep}" == *"ant-tasks"* ]] && found_ant_tasks=true
115 - done
116 -
117 - if [[ -n "${found_ant}" || -n "${found_ant_tasks}" ]]; then
118 - java-pkg_announce-qa-violation --nodie "The ebuild DEPENDS on deprecated ant or ant-tasks"
119 - echo "all"
120 - else
121 - # ebuild doesn't set ANT_TASKS and doesn't depend on ant-tasks or ant
122 - # so we deactivate all tasks that may be installed
123 - echo "none"
124 - fi
125 -}
126 -
127 -# ------------------------------------------------------------------------------
128 # @internal-function java-pkg_ant-tasks-depend
129 #
130 # Translates the WANT_ANT_TASKS variable into valid dependencies.
131 @@ -1913,36 +1878,26 @@
132 fi
133 done
134
135 - # we use this in src_* so we run ant from /
136 - if ROOT=/ has_version ">=dev-java/ant-core-1.7.0"; then
137 - # default ANT_TASKS to WANT_ANT_TASKS, if ANT_TASKS is not set explicitly
138 - ANT_TASKS="${ANT_TASKS:-${WANT_ANT_TASKS}}"
139 -
140 - # override ANT_TASKS with JAVA_PKG_FORCE_ANT_TASKS if it's set
141 - ANT_TASKS="${JAVA_PKG_FORCE_ANT_TASKS:-${ANT_TASKS}}"
142 + # default ANT_TASKS to WANT_ANT_TASKS, if ANT_TASKS is not set explicitly
143 + ANT_TASKS="${ANT_TASKS:-${WANT_ANT_TASKS}}"
144
145 - if is-java-strict; then
146 - # if ant-tasks were not set by ebuild or forced, try to determine them from depends
147 - if [[ -z "${ANT_TASKS}" ]]; then
148 - ANT_TASKS="$(java-pkg_ant-tasks-from-deps)"
149 - fi
150 - else
151 - # if ant-tasks is not set by ebuild or forced, activate all of them
152 - ANT_TASKS="${ANT_TASKS:-all}"
153 - fi
154 + # override ANT_TASKS with JAVA_PKG_FORCE_ANT_TASKS if it's set
155 + ANT_TASKS="${JAVA_PKG_FORCE_ANT_TASKS:-${ANT_TASKS}}"
156
157 - # at this point, ANT_TASKS should be "all", "none" or explicit list
158 - if [[ "${ANT_TASKS}" == "all" ]]; then
159 - einfo "Using all available ANT_TASKS"
160 - elif [[ "${ANT_TASKS}" == "none" ]]; then
161 - einfo "Disabling all optional ANT_TASKS"
162 - else
163 - einfo "Using following ANT_TASKS: ${ANT_TASKS}"
164 - fi
165 + # if ant-tasks is not set by ebuild or forced, use none
166 + ANT_TASKS="${ANT_TASKS:-none}"
167
168 - export ANT_TASKS
169 + # at this point, ANT_TASKS should be "all", "none" or explicit list
170 + if [[ "${ANT_TASKS}" == "all" ]]; then
171 + einfo "Using all available ANT_TASKS"
172 + elif [[ "${ANT_TASKS}" == "none" ]]; then
173 + einfo "Disabling all optional ANT_TASKS"
174 + else
175 + einfo "Using following ANT_TASKS: ${ANT_TASKS}"
176 fi
177
178 + export ANT_TASKS
179 +
180 [[ -n ${JAVA_PKG_DEBUG} ]] && antflags="${antflags} --execdebug -debug"
181 [[ -n ${PORTAGE_QUIET} ]] && antflags="${antflags} -q"
182
183
184
185
186 --
187 gentoo-commits@l.g.o mailing list