Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: calling all eclass phase functions by default
Date: Sat, 16 Aug 2014 23:01:19
Message-Id: 20140816230108.GA11181@linux1
In Reply to: Re: [gentoo-dev] rfc: calling all eclass phase functions by default by Kent Fredric
1 On Sun, Aug 17, 2014 at 10:32:14AM +1200, Kent Fredric wrote:
2 > On 17 August 2014 09:54, William Hubbs <williamh@g.o> wrote:
3 > > My counter proposal to this is that we stop calling eclass phase
4 > > functions automatically, and to minimize the amount of boilerplating
5 > > we would have to do, we use a variable, such as ECLASS_PHASES which
6 > > would be defined at the ebuild level and contain a list of the eclass
7 > > phase functions we want to run automatically.
8 >
9 > This proposal, seems reasonable, given my comments. I anticipate however
10 > its biggest downside would be
11 > the requirement to state *all* the functions you want, which would lead to
12 > maintenance headaches
13 > due to people forgetting to declare they wanted some function or other.
14 >
15 > So if you could sculpt it to be broader by default and have less scope for
16 > developer error, that'd be an improvement.
17 >
18 > --- code start --
19 > ECLASS_EXCLUDE="foo_src_unpack bar_src_unpack"
20 > inherit foo bar baz
21 >
22 >
23 > --- code end ---
24 >
25 > here, src_unpack would be baz_src_unpack *regardless* of composition order
26 > because "foo" and "bar" were barred from being used, and baz took
27 > precedence as a result.
28 >
29 > If baz provides no src_unpack, then the ebuild in question is simply left
30 > without one.
31
32 My concern about reverse logic like excludes is this:
33
34 -- code start --
35
36 # foo and bas provide src_unpack, but you don't want the PMS default
37 # src_unpack to run them, and bar does not provide src_unpack:
38 # You want the rest of the PMS default src_unpack actions to run, so you
39 # don't write src_unpack.
40
41 ECLASS_EXCLUDE="foo_src_unpack bas_src_unpack"
42 inherit foo bar bas
43
44 -- code stop --
45
46 This works fine until the eclass maintainer for bar.eclass decides to
47 add bar_src_unpack.
48
49 As soon as that happens, your ebuild is broken.
50
51 William

Attachments

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

Replies

Subject Author
[gentoo-dev] Re: rfc: calling all eclass phase functions by default Duncan <1i5t5.duncan@×××.net>