Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review
Date: Mon, 19 Oct 2015 17:17:29
Message-Id: CAGfcS_mRQrwBcSz-Fpkep+MXHUT-YWv+qXpbnJm09s4TcE7w+Q@mail.gmail.com
In Reply to: Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review by Alexis Ballier
1 On Mon, Oct 19, 2015 at 10:21 AM, Alexis Ballier <aballier@g.o> wrote:
2 > On Mon, 19 Oct 2015 09:51:20 -0400
3 > Rich Freeman <rich0@g.o> wrote:
4 > [...]
5 >> >
6 >> >> I'd say the best approach for compatibility if you have an existing
7 >> >> eclass and it already exports src_prepare is to not call
8 >> >> eapply_user unless it firmly falls into the #2 category above.
9 >> >
10 >> > Replace 'not call eapply_user' by 'not export src_prepare' and I'd
11 >> > agree with you if going a bit further by ensuring there is no hidden
12 >> > problem:
13 >>
14 >> Well, taken together my recommendation does amount to:
15 >> 1. Avoid exporting src_prepare at all.
16 >> 2. If you do export src_prepare, then don't call eapply_user.
17 >
18 > 2. sucks: an ebuild inheriting that eclass will have to redefine
19 > src_prepare in order not to break with eapi6, so there's no point in
20 > exporting the function in the first place.
21
22 No argument. I'm just saying that nothing stops us from using an
23 existing eclass with EAPI6 without changing function names all over
24 the tree. Non-EAPI6 ebuilds can still use the existing function
25 automatically, and new ebuilds using EAPI6 have to work around the
26 issue until the eclass is revisioned.
27
28 >
29 > Also, since you seem to know well KDE: where would you call
30 > eapply_user, in kde eclasses or cmake-utils ?
31 >
32
33 Definitely in a kde eclass. cmake-utils would fall into the category
34 of a utility eclass, so it ideally shouldn't export phase functions at
35 all. Again, I'm not proposing forcing a change on that now, and it
36 needs more thought, but it would be a lousy place to put eapply_user
37 since it could be used in the same ebuild as another eclass that
38 performs a similar function.
39
40 That might require having the kde eclass call the cmake-utils eclass
41 function. Since the kde eclass is only intended to be used by kde
42 ebuilds maintained by the same group that maintains the eclass, there
43 isn't a problem here. The ebuilds themselves just set a bunch of
44 variables and leave the work to the eclass.
45
46 --
47 Rich

Replies

Subject Author
Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review Alexis Ballier <aballier@g.o>