1 |
Roy Wright wrote: |
2 |
> Howdy, |
3 |
> |
4 |
> I'm looking at http://bugs.gentoo.org/show_bug.cgi?id=196080 |
5 |
> |
6 |
> Basically what is happening is that these lines in build.xml |
7 |
> are not being rewritten with the correct version: |
8 |
> |
9 |
> <property name="javac.target" value="1.2"/> |
10 |
> <property name="javac.source" value="1.2"/> |
11 |
> |
12 |
> Ideally these should be: |
13 |
> |
14 |
> <property name="javac.target" value="$JAVA_PKG_WANT_TARGET"/> |
15 |
> <property name="javac.source" value="$JAVA_PKG_WANT_SOURCE"/> |
16 |
> |
17 |
> While 2010dli@××××××.edu has created a patch to bump these |
18 |
> values to 1.3, this just postpones the real problem. |
19 |
> |
20 |
> Digging into java-ant-2.eclass I think that java-ant_bsfix_files() |
21 |
> is the method that is modifying build.xml. The problem seems |
22 |
> to be that the xml-rewrite*.py scripts are designed to only |
23 |
> match element name (e) plus attribute (a) to change new value (v): |
24 |
> |
25 |
> <e a=v> |
26 |
> |
27 |
> I don't see how to specify element name (eM) plus an attribute |
28 |
> (aM) with value (vM) to match plus attribute (a) to change to |
29 |
> new value (v): |
30 |
> |
31 |
> <eM aM=vM a=v> |
32 |
> |
33 |
> Does anyone have any ideas of how this could be done? |
34 |
> |
35 |
Here's a little background on our friend xml-rewrite.py. |
36 |
|
37 |
The original intent of the xml-rewrite.py was to add source/target |
38 |
attributes to things that did not have them. |
39 |
|
40 |
This was a big part of our strategy for dealing with a system that had |
41 |
1.4 and 1.5. If not specified otherwise, javac defaults to the highest |
42 |
possible source/target (ie Java 1.5 defaults to 1.5). That means if you |
43 |
build something with 1.5 that did not specify the target, and then want |
44 |
to use it with 1.4, you were pretty much out of luck and had to go about |
45 |
rebuilding everything with 1.4. The solution was to create xml-rewrite, |
46 |
and have it fill in target/source to be the lowest possible value the |
47 |
package could support. If a package specified its own source/target, |
48 |
then those were respected knew better than xml-rewrite. |
49 |
|
50 |
So, back to this particular issue... |
51 |
|
52 |
If the values of source/target are causing issues with ecj, it should be |
53 |
reported to upstream. Using a patch until it gets fixed would be |
54 |
acceptable in this case. |
55 |
|
56 |
If it's just an issue on Gentoo, it's worth looking at patching |
57 |
xml-rewrite to allow values to be forced, like with a --force flag or |
58 |
something similar. This shouldn't be a default behavior (definitely not |
59 |
initially at least) due to the large number of ebuilds (stable or |
60 |
otherwise) already using xml-rewrite's behavior as is. |
61 |
|
62 |
-- |
63 |
Joshua Nichols |
64 |
Gentoo/Ruby Developer |
65 |
Gentoo/Java Developer |
66 |
http://technicalpickles.com |
67 |
|
68 |
-- |
69 |
gentoo-java@g.o mailing list |