Gentoo Archives: gentoo-dev

From: Kristian Fiskerstrand <k_f@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Eclasses and EAPI
Date: Tue, 06 Sep 2016 12:51:39
Message-Id: 2ad67a36-c914-d9fb-4a19-63ac663e2877@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: Eclasses and EAPI by Kent Fredric
1 On 09/06/2016 12:44 PM, Kent Fredric wrote:
2 > On Mon, 5 Sep 2016 15:03:36 +0200
3 > Michał Górny <mgorny@g.o> wrote:
4 >
5 >> On Fri, 2 Sep 2016 18:13:20 +0200
6 >> Kristian Fiskerstrand <k_f@g.o> wrote:
7 >>
8 >>> I'm wondering whether it wouldn't make sense to require eclasses (or
9 >>> strongly encourage) to include an explicit list of EAPIs it has been
10 >>> tested for in order to ease testing when introducing new EAPIs.
11 >>>
12 >>> We have seen some issues already with EAPI6 bump related to get_libdir
13 >>> and people updating EAPI in ebuild without properly testing the
14 >>> inherited eclasses. having a whitelist in place and die if eclass is not
15 >>> updated to handle it solves it.
16 >>>
17 >>> Thoughts? comments? cookies? threats?
18 >>
19 >> +1. Because:
20 >>
21 >> 1. it makes it possible to change API safely with EAPI bump, including
22 >> major refactorings,
23 >>
24 >> 2. it makes it possible for the eclass maintainer to confirm that
25 >> the eclass is correctly ported to new EAPI, rather than some random
26 >> developer with poor knowledge of eclass assuming it works fine,
27 >>
28 >> 3. it makes it possible to ban the eclass in a new EAPI to more
29 >> effectively phase it out.
30 >>
31 >> This only reminds me of the cases when eclasses weren't calling
32 >> eapply_user in EAPI 6 and caused ebuilds to fail. Because someone
33 >> assumed that if his ebuild works in EAPI 6, then the eclass is
34 >> certainly correct.
35 >>
36 >
37 > My only question is how we enforce it.
38 >
39 > Given that eclasses are themselves without EAPI, and relying on this
40 > check existing in PMS would require such a feature defined in a future EAPI
41 >
42 > I suspect for the forseeable future we're going to need to double our effort,
43 > having a whitelist that is only able to be interpreted by PMS clients that implement
44 > EAPI7, and then the traditional logic for Pre-EAPI7.
45 >
46
47 I believe you're overthinking it, if we make it a guideline to include a
48 section of the eclass (as many already have) that does e.g (take this
49 for example purposes) there is no EAPI/PMS change needed
50 case "${EAPI:-0}" in
51 4|5|6)
52 ;;
53 *) die "EAPI=${EAPI} is not supported" ;;
54
55
56
57 --
58 Kristian Fiskerstrand
59 OpenPGP certificate reachable at hkp://pool.sks-keyservers.net
60 fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] RFC: Eclasses and EAPI Rich Freeman <rich0@g.o>