Gentoo Archives: gentoo-dev

From: Patrice Clement <monsieurp@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Importance of SLOTs on Java dependencies
Date: Wed, 08 Apr 2015 15:10:51
Message-Id: 20150408151030.GJ15352@sigkill.axestech.net
In Reply to: Re: [gentoo-dev] Importance of SLOTs on Java dependencies by Pacho Ramos
1 Chewi suggested a similar solution in #gentoo-java. How do we get started with
2 contributing to repoman?
3
4 However.. everytime I tried asking questions about repoman, I've been told I
5 shouldn't bother improving it because this magic python script that seems to be
6 doing all sort of things (over 3000 lines packed in one file) (yes my dear) is
7 being rewritten.
8
9 Is it still underway?
10
11 Cheers
12
13 Tuesday 07 Apr 2015 20:41:05, Pacho Ramos wrote :
14 > El dom, 05-04-2015 a las 17:16 +0100, James Le Cuirot escribió:
15 > > Hello all,
16 > >
17 > > Firstly, I would like to take this opportunity to remind all devs
18 > > touching ebuilds with Java .jar dependencies about the importance of
19 > > restricting these dependencies to specific SLOTs.
20 > >
21 > > There is no cross-platform or even platform-specific location for
22 > > Java .jar files so each distro tends to do its own thing. Gentoo's Java
23 > > eclasses install metadata about any .jar files in a file called
24 > > package.env either at /usr/share/${PN}-${SLOT} or just /usr/share/${PN}
25 > > when the SLOT is 0.
26 > >
27 > > java-config is executed both at build time and at run time to read this
28 > > metadata so that it can build a classpath. If one of the dependencies
29 > > unexpectedly changes SLOT due to package updates then the chain breaks.
30 > > You must therefore *always* restrict the SLOT, even if that dependency
31 > > currently has a SLOT of 0.
32 > >
33 > > Why do we SLOT Java stuff so much? Java applications tend to have many
34 > > third party dependencies so it is inevitable that we would sometimes
35 > > need to have more than one version of a library installed at one time.
36 > > The write once, run anywhere nature of Java also means that upstream
37 > > doesn't expect you to run against library versions other than the ones
38 > > they shipped their application with. We do have a tool to check for
39 > > compatibility between versions though to avoid SLOT proliferation
40 > > getting out of hand. Classpath conflicts involving multiple versions
41 > > have rarely been an issue up till now but we have thought of measures
42 > > to combat this in future if needs be.
43 > >
44 > > I felt the need to write the above because I have seen many instances
45 > > where devs not familiar with Java packaging have made this mistake. Now
46 > > I need to ask what to do in the case of ebuilds that have already been
47 > > marked stable.
48 > >
49 > > To bring up a real example, I would like to bump dev-java/jna with a
50 > > new SLOT for the new version. There are several reverse dependencies, 3
51 > > of which do not specify a SLOT, and 2 of these have already been marked
52 > > stable. Upon giving jna a new SLOT, all these packages would instantly
53 > > fail to build if jna:0 is not already installed and they would also
54 > > fail to run if jna:0 gets depcleaned. Simply leaving the stable ebuilds
55 > > as they are is therefore not an option. My preferred solution would be
56 > > create a revbump that solely amends (R)DEPEND, leaving the KEYWORDS
57 > > exactly as they are. This is controversial but what other choice is
58 > > there? I could delay the jna bump but this would push back this thread
59 > > of work by a month when I already have a huge backlog. Please do not let
60 > > bureaucracy get in the way here.
61 > >
62 > > Of course I would certainly give any maintainers a heads up before
63 > > doing this. Unfortunately, in this particular case, I contacted miknix
64 > > about dev-embedded/arduino over 2 weeks ago and haven't heard anything
65 > > back. He hasn't been seen on IRC for over 5 months. :(
66 > >
67 >
68 > Wouldn't be possible to show a repoman warning when a dependency on any
69 > dev-java/${PN} doesn't specify a SLOT? That would save of from
70 > forgetting this in some years ;)
71 >
72 >

Replies

Subject Author
Re: [gentoo-dev] Importance of SLOTs on Java dependencies James Le Cuirot <chewi@g.o>