Gentoo Archives: gentoo-dev

From: Chris Reffett <creffett@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: calling all eclass phase functions by default
Date: Mon, 18 Aug 2014 13:23:15
Message-Id: 53F1FE26.4030507@gentoo.org
In Reply to: Re: [gentoo-dev] rfc: calling all eclass phase functions by default by hasufell
1 On 8/18/2014 8:56 AM, hasufell wrote:
2 > hasufell:
3 >>
4 >> Even more interesting... you can work around this by inheriting
5 >> base.eclass explicitly before e.g. unpacker.eclass, something like
6 >>
7 >> inherit base unpacker games
8 >>
9 >> => unpacker_src_unpack() is carried out by default (and the ebuild
10 >> breaks if someone thinks the base.eclass is useless and removes it)
11 >>
12 >> inherit unpacker games
13 >>
14 >> => unpacker_src_unpack is not carried out by default although
15 >> games.eclass does not directly overwrite it
16 >>
17 >> If you think any of this is sensible...
18 >>
19 >
20 > Almost forgot, of course this does not work if you expect
21 > unpacker_src_unpacker() to run:
22 > inherit unpacker games base
23 >
24 > as well as
25 > inherit unpacker base games
26 >
27 > however
28 > inherit games unpacker base
29 >
30 > will work.
31 >
32 > And now... guess why the games herd made it a policy to always inherit
33 > games.eclass last. Because of the unpredictability of eclasses and that
34 > they may randomly add exported phase functions. It's a bit paranoid, but
35 > understandable, since we don't have any real rules here.
36 >
37 > So in the end 3 eclasses all tell you "inherit me last! really!". Good
38 > luck with figuring out how to make a gnome game with python and multilib
39 > support work together. I can predict the days such a review would take
40 > in #gentoo-sunrise. Not less than 3.
41 >
42 Would it be feasible to add a repoman check for situations like this,
43 where the behavior of a phase is dependent on inherit order? If so, it
44 seems reasonable to me to require explicit calls to eclass functions in
45 these cases to make it clear what's being called when.
46
47 Chris Reffett

Replies