1 |
Luca Barbato wrote: |
2 |
|
3 |
> Tiziano Müller wrote: |
4 |
>> Joe Peterson wrote: |
5 |
>> |
6 |
>>> Ciaran McCreesh wrote: |
7 |
>>>> And a file extension is far less obscurely complex than enforcing |
8 |
>>>> arbitrary syntax restrictions upon ebuilds. |
9 |
>>> I disagree. One is exposed to devs only as ebuild syntax; the other is |
10 |
>>> exposed in an inappropriate location to everyone looking at the portage |
11 |
>>> tree. |
12 |
>>> |
13 |
>>>> No it can't. EAPI has to be known before the source can start. Bash |
14 |
>>>> doesn't provide traps for executing code upon changed variables. |
15 |
>>> Doing it out-of-band solve this. |
16 |
>>> |
17 |
>>>> No, it's only needed once per non-trivial change. So we might as well |
18 |
>>>> just change it for every EAPI. |
19 |
>>> Huh? If the "new" portage knows how to determine the EAPI definitively |
20 |
>>> (and that would be defined), it can deal with the differences. |
21 |
>>> |
22 |
>>>> And then how do we deal with EAPI 3, where the syntax changes again? |
23 |
>>> Portage (or whatever PM) reads the EAPI, determines it is 3, and goes |
24 |
>>> from there. If you change the way you declare EAPI each time, yeah, |
25 |
>>> that's a problem, but I'm not sure why that would ne necessary. |
26 |
>> No, that is not the problem. |
27 |
>> |
28 |
>> Example: |
29 |
>> In EAPI 42 we define that the package manager must provide a global |
30 |
>> function extract_depend_from_setup_py() such that it is callable at a |
31 |
>> global level in an ebuild like this |
32 |
>> |
33 |
>> *snip start* |
34 |
>> |
35 |
>> # Copyright 1999-2007 Gentoo Foundation |
36 |
>> # Distributed under the terms of the GNU General Public License v2 |
37 |
>> # $Header: $ |
38 |
>> |
39 |
>> EAPI=42 |
40 |
>> |
41 |
>> DESCRIPTION="A library aiming to support agile and test-driven python |
42 |
>> development on various levels." |
43 |
>> SRC_URI="http://codespeak.net/download/${PN}/${P}.tar.gz" |
44 |
>> HOMEPAGE="http://codespeak.net/py/" |
45 |
>> KEYWORDS="~amd64 ~x86" |
46 |
>> SLOT="0" |
47 |
>> LICENSE="MIT" |
48 |
>> IUSE="" |
49 |
>> |
50 |
>> extract_depend_from_setup_py |
51 |
>> |
52 |
>> *snip end* |
53 |
>> |
54 |
>> Now, a package manager (or a tool) not knowing EAPI 42 will fail when it |
55 |
>> tries to source the above ebuild to determine the EAPI version (as it is |
56 |
>> being currently done as far as I understood it) because |
57 |
>> extract_depend_from_setup_py is undefined. |
58 |
>> So it won't even be able to read out the EAPI. |
59 |
>> |
60 |
>> With the EAPI in the filename tools now knowing EAPI-42 will either |
61 |
>> ignore the above foo-1.0.ebuild-42 or mask it because they may identify |
62 |
>> the EAPI-version without sourcing the ebuild. |
63 |
>> |
64 |
> |
65 |
> Check if exists a line EAPI=*$, if does and the rest of the string |
66 |
> matches an understood eapi, go on sourcing, otherwise ignore/mask it... |
67 |
|
68 |
... and package managers which don't do that already still fail. |
69 |
|
70 |
|
71 |
-- |
72 |
gentoo-dev@l.g.o mailing list |