1 |
On Sunday 17 May 2009 08:29:31 Patrick Lauer wrote: |
2 |
> I thought we had agreed that (1) with GLEP55 you have to source the ebuild |
3 |
> anyway (whereas the other proposal allows to just parse it to get at the |
4 |
> EAPI value) and (2) you can cache it sanely so that performance isn't the |
5 |
> issue? |
6 |
|
7 |
You don't /have/ to source the ebuild to get the EAPI for GLEP 55. That |
8 |
section is only there to cover corner cases that some people wanted to be |
9 |
well-defined, and it could easily be removed if the consensus is that that |
10 |
isn't a problem. On the other hand, it could equally well be added to |
11 |
whatever alternative solution you might suggest. |
12 |
|
13 |
Consider the case where you have a foo-1.2.ebuild-4, and in the contents of |
14 |
the file it sets EAPI=5. What should that mean? There are three |
15 |
possibilities that I can think of: |
16 |
|
17 |
1) It's illegal, don't do that. Then there's no need to source the file to |
18 |
find the EAPI, because the corner case should never happen, and if it does, |
19 |
the behaviour can be left undefined. |
20 |
|
21 |
2) It's legal, and the ebuild has EAPI 4. Then there's no need to source the |
22 |
file to find the EAPI, because the EAPI in the filename always wins. |
23 |
|
24 |
3) It's legal, and the ebuild has EAPI 5. This requires sourcing the ebuild |
25 |
to find the EAPI, and it's what GLEP 55 currently says. |
26 |
|
27 |
Now consider the alternative fixed-format "^EAPI=" suggestion. What if we |
28 |
have a foo-1.2.ebuild, that sets EAPI=4 at the top, and then sets EAPI=5 |
29 |
further down? What should that mean? The same three possibilities apply |
30 |
here as in the GLEP 55 case. If you think it should be illegal, or that it |
31 |
should mean EAPI=4, then there's no need to source the ebuild just to find |
32 |
the EAPI. If you think it should mean EAPI=5, then you do need to source the |
33 |
ebuild, exactly the same as in GLEP 55. |
34 |
|
35 |
Either way, this isn't a valid reason to choose the fixed-format alternative |
36 |
over GLEP 55, because the same concerns do or do not apply to both. |