Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Eclasses and EAPI
Date: Mon, 05 Sep 2016 13:59:18
Message-Id: 20160905155854.385e0484@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: Eclasses and EAPI by "Michał Górny"
1 On Mon, 5 Sep 2016 14:58:29 +0200
2 Michał Górny <mgorny@g.o> wrote:
3
4 > On Mon, 5 Sep 2016 11:20:29 +0200
5 > Alexis Ballier <aballier@g.o> wrote:
6 >
7 > > On Fri, 2 Sep 2016 19:19:16 +0200
8 > > Kristian Fiskerstrand <k_f@g.o> wrote:
9 > >
10 > > > On 09/02/2016 07:17 PM, Rich Freeman wrote:
11 > > > > On Fri, Sep 2, 2016 at 12:53 PM, Alexis Ballier
12 > > > > <aballier@g.o> wrote:
13 > > > >> On Fri, 2 Sep 2016 18:13:20 +0200
14 > > > >> Kristian Fiskerstrand <k_f@g.o> wrote:
15 > > > >>
16 > > > >>> Hi Devs,
17 > > > >>>
18 > > > >>> I'm wondering whether it wouldn't make sense to require
19 > > > >>> eclasses (or strongly encourage) to include an explicit list
20 > > > >>> of EAPIs it has been tested for in order to ease testing when
21 > > > >>> introducing new EAPIs.
22 > > > >>>
23 > > > >>> We have seen some issues already with EAPI6 bump related to
24 > > > >>> get_libdir and people updating EAPI in ebuild without properly
25 > > > >>> testing the inherited eclasses. having a whitelist in place
26 > > > >>> and die if eclass is not updated to handle it solves it.
27 > > > >>>
28 > > > >>> Thoughts? comments? cookies? threats?
29 > > > >>>
30 > > > >>
31 > > > >> Never liked to wait for a whole eclass update for a new eapi
32 > > > >> when I only use a couple functions from it that I have tested
33 > > > >> when updating an ebuild.
34 > > > >>
35 > > > >
36 > > > > I think the idea is a sound one though. And there is no reason
37 > > > > it couldn't be tweaked to give the option to set it at the
38 > > > > function level and not the eclass level. This is also an
39 > > > > argument for simplifying eclasses when it makes sense (I
40 > > > > realize this will never be 100%).
41 > > >
42 > > > If specific functions can be useful there is also a case to be
43 > > > made for refactoring of the code
44 > >
45 > > Well, let's say we have an eapi that introduces usedeps and
46 > > src_configure. Let's say we have an ebuild with a few
47 > > built_with_use || die calls that could benefit from usedeps. Let's
48 > > call this ebuild vlc. Let's say this ebuild inherits an eclass for
49 > > updating the icon cache and redefines all other ebuild phases.
50 > > Let's call this eclass gnome2. Let's assume this eclass is widely
51 > > used by tens of packages that do actually use the exported
52 > > functions from it. It makes a lot of sense to ban this new eapi in
53 > > this eclass until it is ported. However, porting it takes months
54 > > and we are stick with those built_with_use || die calls.
55 > >
56 > > Of course, the best solution is to port the eclass. The second
57 > > option is to drop the inherit from the ebuild and call the relevant
58 > > functions by defining ebuild phases. This duplicates a bit of code
59 > > but works well. However, it seems to me it is more practical to
60 > > have an eclass not dying and letting ebuild writers deal with their
61 > > crap if something goes wrong.
62 >
63 > That's the worst argument I've heard for a long time.
64 >
65 > It could be pretty much summarized as 'let's commit crap and hope it
66 > will work; worst case, things will go horribly kaboom on users'.
67
68 Then you've not understood a single bit of what was written.

Replies

Subject Author
[gentoo-dev] Re: RFC: Eclasses and EAPI Duncan <1i5t5.duncan@×××.net>