1 |
On 11-11-2007 19:27:50 +0000, Ciaran McCreesh wrote: |
2 |
> On Sun, 11 Nov 2007 21:21:30 +0200 |
3 |
> Petteri Räty <betelgeuse@g.o> wrote: |
4 |
> > > Neither EAPI 0 nor EAPI 1 provide any mechanism for an ebuild to |
5 |
> > > 'die' at global scope. There's simply no way for eclasses to |
6 |
> > > complain that they're being misused. |
7 |
> > |
8 |
> > Well nothing formal but the ebuild developer should pick up ewarn/echo |
9 |
> > /whatever messages coming from global scope. That's what we have in |
10 |
> > debug.eclass atm. |
11 |
> |
12 |
> Past experience has shown that those messages will end up being seen by |
13 |
> end users and not being picked up by developers. People changing |
14 |
> eclasses generally don't force a metadata generation for every package |
15 |
> that uses the eclass. |
16 |
> |
17 |
> I suspect that for existing eclasses, the safest way to proceed is to |
18 |
> make a new eclass and move common code into a third eclass. So you'd |
19 |
> have foo.eclass doing EAPI 0 specific stuff and inheriting foo-common, |
20 |
> and foo-eapi1.eclass doing EAPI 1 specific stuff and inheriting |
21 |
> foo-common. |
22 |
|
23 |
This is indeed a very valid point that at least I have ignored for now. |
24 |
|
25 |
In order (for me) not to mix up all kinds of issues here, this is my |
26 |
percieved state with regard to EAPI. |
27 |
|
28 |
EAPI=0 is the assumed to be used EAPI when no EAPI is specified in an |
29 |
ebuild. EAPI=1 as supported by Portage is like an extension of EAPI=0 |
30 |
where EAPI=0 is like a subset of EAPI=1. For this reason current (soon |
31 |
to be stable?) Portage, and at least the trunk version have EAPI=1 |
32 |
support, but can deal with EAPI=0 ebuilds fine. |
33 |
|
34 |
In this setting, one could say that eclasses should remain EAPI=0, such |
35 |
that all ebuilds will be able to work with them. |
36 |
|
37 |
However, if an EAPI will require some change that makes it backwards |
38 |
incompatible then this won't work any more. What you get is that e.g. |
39 |
for an eclass to work properly it needs to know about variable X, which |
40 |
of course on previous EAPIs does not exist, and hence can result in |
41 |
undesired behaviour. |
42 |
|
43 |
While Ciaran's suggestion would allow some things to work there, it |
44 |
still does not deal with the issue that eclasses should actually be |
45 |
marked with an EAPI level too. (Ideally they also would be part of the |
46 |
digests of an ebuild, but that aside.) A slight alternative to Ciaran's |
47 |
idea here would be to make EAPI1, EAPI2 etc. subdirs in the eclass |
48 |
directory where sort of eclass overloading can be done. This would only |
49 |
solve eclasses not to have an EAPI= in it, so they don't overwrite the |
50 |
ebuild's value. |
51 |
|
52 |
|
53 |
-- |
54 |
Fabian Groffen |
55 |
Gentoo on a different level |
56 |
-- |
57 |
gentoo-dev@g.o mailing list |