Gentoo Archives: gentoo-java

From: Alistair Bush <ali_bush@g.o>
To: gentoo-java@l.g.o
Subject: [gentoo-java] Current state of java-config for a new release.
Date: Mon, 21 Jan 2008 06:00:18
Message-Id: 479434C1.4020609@gentoo.org
1 Ok, as we all know java-config has some issues :)
2
3 Firstly the outstanding issue(s)
4
5 [ISSUE} Currently the javadoc virtual is broken as it only has
6 blackdown-jdk-1.4.2 and sun-jdk-1.5 as its providing vm's. java-config
7 currently always takes a positive view and uses the highest vm possible
8 ( ie sun-jdk-1.6 ). So even when you have sun-jdk-1.5 it will still
9 result in the error.
10
11 !!! ERROR: Couldn't find suitable VM. Possible invalid dependency string.
12
13 [WORKAROUND] virtuals must include the highest vm's ( ie sun-jdk-1.6 )
14 if they are going to PROVIDE virtuals. otherwise ebuild must depend on
15 || ( =virtual/jdk-1.x virtual/jdk-1.y etc )
16
17 I don't consider this enough to stop the release mainly because there
18 are no current virtuals that _should_ (note the javadoc virtual isn't
19 complete ) have this issue as vm's only add api <fingers crosses>).
20
21 [ISSUE] Currently java-config uses a packages TARGET to determine which
22 vm to use. Really java-config should use the VM var and support
23 <virtual/jre-1.x, =virtual/jre-1.x, etc, etc
24
25 [WORKAROUND] None, believe we are stuck with it until Generation 3 ( at
26 least ), this could require a major rewrite.
27
28
29 Now, here are a set of Use Cases. Hopefully you can look at them an say
30 yes brilliant they are great, but I would like to make sure ive covered
31 everything as much as possible. ( This is more for my benefit than yours )
32
33 Use Case 1: java-virtuals/jmx. (ie. both packages and vm's. If you
34 are wondering where jmx is, I wouldn't bother looking for it the
35 java-virtuals overlay one is outdated and broken ).
36
37 a)
38 $ java-config-2 -f
39 sun-jdk-1.5
40
41 $ java-config -p jmx
42 <nothing>
43
44 b)
45 $ java-config -s 1
46 Now using blackdown-jdk-1.4.2 as your user JVM
47
48 $ java-config -p jmx
49 /usr/share/sun-jmx/lib/jmxri.jar:/usr/share/sun-jmx/lib/jmxtools.jar
50
51 c)
52 $ emerge -C sun-jmx
53 $ java-config-2 -s 1
54 Now using blackdown-jdk-1.4.2 as your user JVM
55 $ ./java-config-2 -p jmx
56 !!! ERROR: No providers are available, please ensure you have one of the
57 following VM's or Package's;
58 VM's (Your active vm must be one of these): sun-jdk-1.6,
59 sun-jdk-1.5
60 Packages's: sun-jmx
61
62 ___NOTE___ is this error msg confusing?
63
64 d)
65 $ ./java-config-2 -s 35 as your us
66 Now using sun-jdk-1.5 as your user JVM
67
68 $ ./java-config-2 -p jmx your user
69
70
71 Use Case 2: java-virtuals/javamail ( ie a package only virtual, another
72 example is servlet-api )
73
74 $ ./java-config-2 -p javamail
75 /usr/share/gnu-javamail-1/lib/gnumail-providers.jar:/usr/share/gnu-javamail-1/lib/mail.jar
76 $ ./java-config-2 -p javamail
77 /usr/share/sun-javamail/lib/mail.jar
78
79 ___NOTE___ had to edit /etc/java-config-2/virtuals to do this.
80 javamail=gnu-javamail-1 and javamail=sun-javamail respectively.
81
82 Use Case 3: depend-java-query (the interesting ones)
83
84 ___NOTE___ some query strings might not be valid within DEPEND but we
85 don't perform as strict a checks as portage.
86
87 a) (in various combo's, also after demonstrating a point I don't
88 continue to do so.)
89 $ ./depend-java-query --get-vm '=virtual/jdk-1.4*
90 =java-virtuals/servlet-api-2.4'
91 blackdown-jdk-1.4.2
92 $ ./depend-java-query --get-vm '=virtual/jdk-1.4*
93 =java-virtuals/servlet-api-2.4*'
94 blackdown-jdk-1.4.2
95 $ ./depend-java-query --get-vm '=virtual/jdk-1.4*
96 java-virtuals/servlet-api:2.4'
97 blackdown-jdk-1.4.2
98 $ ./depend-java-query --get-vm '=virtual/jdk-1.4*
99 =java-virtuals/servlet-api:2.4'
100 blackdown-jdk-1.4.2
101
102 b)
103 $ ./depend-java-query --get-vm '=virtual/jdk-1.5*
104 java-virtuals/servlet-api:2.4'
105 sun-jdk-1.5
106
107 c)
108 $ ./depend-java-query --get-vm '|| ( =virtual/jdk-1.5* =virtual/jdk-1.4*
109 ) java-virtuals/servlet-api:2.4'
110 sun-jdk-1.5
111
112 d)
113 $ ./depend-java-query --get-vm '>=virtual/jdk-1.5
114 java-virtuals/servlet-api:2.4'
115 sun-jdk-1.6
116 $ ./depend-java-query --get-vm '>=virtual/jdk-1.6
117 java-virtuals/servlet-api:2.4'
118 sun-jdk-1.6
119
120 e) (No sun-jmx )
121 $ ./depend-java-query --get-vm '=virtual/jdk-1.4* java-virtuals/jmx'
122 !!! ERROR: Couldn't find suitable VM. Possible invalid dependency string.
123
124 $ ./depend-java-query --get-vm '>=virtual/jdk-1.4* java-virtuals/jmx'
125 sun-jdk-1.6
126
127 ( With sun-jmx ) available )
128 $ ./depend-java-query --get-vm '=virtual/jdk-1.4* java-virtuals/jmx'
129 blackdown-jdk-1.4.2
130
131 So hopefully there will be a new release of java-config this week, and
132 that release of java-config can be stabilised
133
134 Alistair
135
136 ps. God I hope this is everything !!!!
137 pss. Seeing I fixed somethings during the writing of this there is more
138 chance than not ive broken something else :P
139 --
140 gentoo-java@l.g.o mailing list