Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] RFC: Eclasses and EAPI
Date: Tue, 06 Sep 2016 13:19:52
Message-Id: CAGfcS_mCucdL0e_hHX3dYY8stq3HxH65y0dCecyC2PSE5uW1zw@mail.gmail.com
In Reply to: Re: [gentoo-dev] RFC: Eclasses and EAPI by Kristian Fiskerstrand
1 On Tue, Sep 6, 2016 at 8:51 AM, Kristian Fiskerstrand <k_f@g.o> wrote:
2 >
3 > I believe you're overthinking it, if we make it a guideline to include a
4 > section of the eclass (as many already have) that does e.g (take this
5 > for example purposes) there is no EAPI/PMS change needed
6 > case "${EAPI:-0}" in
7 > 4|5|6)
8 > ;;
9 > *) die "EAPI=${EAPI} is not supported" ;;
10 >
11
12 I think the question becomes then what do we do about eclasses that
13 don't follow the guideline?
14
15 With a PMS change we can in the future enforce that the eclass
16 explicitly declare support by making it break by default if nothing is
17 done. With the approach above an eclass works with any EAPI by
18 default as far as PMS is concerned, and we rely on eclasses to
19 self-destruct when they're supposed to.
20
21 I think this can be controlled if we're disciplined about catching
22 this in new eclasses. We can do a one-time commit to all existing
23 eclasses to add this code somewhere if the maintainers do not add it.
24 That might involve either just having the eclasses abort on any EAPI
25 by default, on anything but the oldest supported EAPI, or just putting
26 in an acceptance of all existing EAPIs in which case we accept the
27 problem as far as the next PMS update but no further. Obviously the
28 ideal solution is for eclasses to be properly maintained.
29
30 In general though I'm all for the proposal, and I tend to think that
31 it is best for an eclass to either support an EAPI or not, and not do
32 this per-function. If that leads to refactoring so much the better.
33 I'm flexible on exactly how it gets implemented, but both eclass
34 maintainers and users should have a clear understanding of what
35 is/isn't supported.
36
37 --
38 Rich

Replies

Subject Author
Re: [gentoo-dev] RFC: Eclasses and EAPI Kristian Fiskerstrand <k_f@g.o>
Re: [gentoo-dev] RFC: Eclasses and EAPI "Michał Górny" <mgorny@g.o>