Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] java-pkg-opt-2.eclass: fix java-pkg-opt-2_src_prepare to always call eapply_user for EAPI-6+
Date: Mon, 07 Aug 2017 12:25:34
Message-Id: 20170807152522.9e17f8d1d13f2149561e9faf@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] java-pkg-opt-2.eclass: fix java-pkg-opt-2_src_prepare to always call eapply_user for EAPI-6+ by James Le Cuirot
1 On Sun, 30 Jul 2017 22:08:18 +0100 James Le Cuirot wrote:
2 > On Sun, 30 Jul 2017 14:32:53 +0300
3 > Andrew Savchenko <bircoph@g.o> wrote:
4 >
5 > > For EAPI 6+ java-pkg-opt-2_src_prepare() has eapply_user call via
6 > > java-utils-2_src_prepare() from java-utils-2.eclass. But
7 > > java-utils-2_src_prepare() call is conditional and in case when
8 > > package is build with USE=-java java-utils-2_src_prepare() is not
9 > > called, hence eapply_user is not called in src_prepare phase and
10 > > ebuild fails.
11 > >
12 > > The following patch fixes this by calling eapply_user if java USE
13 > > is disabled _and_ EAPI is 6+.
14 >
15 > This makes sense so no problem here.
16 >
17 > > [pedantic mode on]
18 > > Strictly speaking when EAPI is other than [0-5]. The way java-*
19 > > eclasses are now, they assume ![0-5] == 6+. It may be speculated
20 > > that this is not entirely correct and many other eclasses
21 > > explicitly deny all unknown EAPIs. If someone is interesting in
22 > > fixing this issue, please handle it with the java team and do not
23 > > mix it into the problem described at the beginning. My goal now is
24 > > to fix eapply_user issue which cases trouble for any EAPI 6
25 > > packages with optional java support and default src_prepare() at
26 > > the ebuild scope.
27 > > [pedantic mode off]
28 >
29 > Agreed. I don't think java-utils-2_src_prepare() should be changed in
30 > this regard as the behaviour may continue to be correct but the eclass
31 > should have a global EAPI check that forbids anything beyond 6 like
32 > other eclasses do.
33
34 Applied in the tree. The whitespace change from the original patch
35 is removed.
36
37 Best regards,
38 Andrew Savchenko