1 |
> I don't quite see how that deals with an eclass calling econf in its |
2 |
> exported src_compile? Seems like EAPI versioning for eclasses (with |
3 |
> implicit 0 only) is more what you're after for that issue (so the PM |
4 |
> could suppress src_configure if src_compile is going to resolve to an |
5 |
> EAPI-0 eclass function, although the inheritance stack might prove |
6 |
> problematic.) |
7 |
|
8 |
I don't know of any way for the pm to detect if the eclass supports |
9 |
given eapi or not, and even less if exported src_compile will be eapi-2 |
10 |
aware or not. |
11 |
|
12 |
> Having to die for an unsupported EAPI seems like the wrong approach; |
13 |
> if it's not going to work the PM shouldn't source it. If it can be |
14 |
> made to work by filtering certain functions, that's doable. |
15 |
|
16 |
I tend to see dying for an unsupported eapi as eclass versioning for |
17 |
the poor people but that's the only thing we can do atm afaik. For now, |
18 |
all eapi are backward compatible wrt to sourcing so that's not really |
19 |
an issue to source an eapi-0 eclass withing an eapi-2 ebuild. I think |
20 |
there has been a discussion on eclasses vs eapi before and the outcome |
21 |
was that eclasses should add hacky checks for eapi; which means to me |
22 |
we'll have to adjust those hacky checks for each new eapi. |
23 |
|
24 |
However, for now, not dying allows workarounds like: |
25 |
http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/ogmrip/ogmrip-0.12.2.ebuild?view=markup |
26 |
but I don't consider it very pretty. |
27 |
|
28 |
> In the worst case, an ebuild switching to EAPI will require eclass |
29 |
> maintenance; this is where the separation of elibs (useful code) and |
30 |
> eclasses (template ebuilds) would be useful, although that needs |
31 |
> versioning too. |
32 |
|
33 |
The problem will remain for this new definition of eclasses; glad to |
34 |
see you're volunteering to fix every single eclass that exports a |
35 |
src_compile/unpack function for eapi-2 :) |
36 |
|
37 |
If by template ebuilds you mean the EXPORT_FUNCTIONS line and some deps, |
38 |
then I dont see the difference between eapi versioning for eclasses and |
39 |
a switch/case for each eapi in the unversioned eclass. Note that "useful |
40 |
code" can differ upon eapi (I'm thinking about has_version checks). |
41 |
|
42 |
Regards, |
43 |
|
44 |
Alexis. |