Gentoo Archives: gentoo-java

From: Alistair Bush <ali_bush@g.o>
To: gentoo-java@l.g.o
Subject: Re: [gentoo-java] Virtual troubles
Date: Mon, 14 Jan 2008 10:29:45
Message-Id: 478B391E.3070509@gentoo.org
In Reply to: [gentoo-java] Virtual troubles by Vlastimil Babka
1 Vlastimil Babka wrote:
2 > Hi,
3 >
4 > Discovered some problems with virtuals today.
5 :)
6 >
7 > First one is in the depend-java-query tool, which can't correctly parse
8 > dependencies as =java-virtuals/servlet-api-2.3* - transforms to
9 > "servlet-api-2.3*" which it can't find, and raises exception - see how
10 > it ends up in bug 205453 :) So, only deps like
11 > "~java-virtuals/servlet-api-2.3" work. Should be fixed, or we decide to
12 > go with slot deps and start sticking EAPI=1 in our ebuilds? I'm not sure
13 > it can even parse 'java-virtuals/servlet-api:2.3' in current version :)
14
15 Have update java-config to (hopefully) do both :)
16
17 java-config -p package:slot works at least (is a little dump tho as
18 package:0 won't currently work)
19
20 >
21 > The other trouble I have is with eclass functions. It's confusing that
22 > java-pkg_getjars() doesn't have --virtual parameter, but if you look
23 > into what the parameter does, you realize it really doesn't need it.
24 > Still, confusing :)
25 > The worse trouble is with the functions that actually take the
26 > parameter, java-pkg_jar-from $package $jar and java-pkg_getjar. By
27 > passing --virtual, you say "I can't know what the particular provider's
28 > jar names are, so depend on the whole package", but still you have to
29 > pass an actual 'foo.jar' parameter. That's strange. What if there's new
30 > provider with different jar name? What if the virtual is satisfied by
31 > the VM itself? Suddenly you get an error, or am I wrong?
32
33 Let me clarify this as "I can't know the name of any implementing jars
34 (if they are separate) but I do know the name of the api as that is fixed"
35
36 So basically
37
38 sun-javamail and gnu-javamail implement (surprise surprise) the javamail
39 api. sun-javamail has one jar (mail.jar, API and Implementation)
40 gnu-javamail has 2 (mail.jar, the API and another, the actual
41 implementation)
42
43 so
44
45 java-pkg_jarfrom --virtual javamail mail.jar will retrieve mail.jar
46 without recording the dependency as just that jar (as we can't know
47 whether they are separate or not)
48
49 as the other functions don't record jar level deps the option is mute.
50
51 Basically this means that if package is to be suitable for
52 java-virtualizing then it must provide a jar that is similarly (or more
53 exactly 'exactly') named as every other providers ${API}.jar
54
55 javamail -> mail.jar
56 servlet-api -> serlvetapi.jar jsp.jar
57 grandma's special recipe -> gsr.jar
58 >
59 > VB
60
61 Sorry It has taken me time to reply, decided it was better to fix
62 before explain.
63 --
64 gentoo-java@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-java] Virtual troubles Vlastimil Babka <caster@g.o>