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