1 |
On Mon, 12 Mar 2012 00:08:46 -0700 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> On 03/11/2012 11:50 PM, Kent Fredric wrote: |
5 |
> > #!/usr/bin/env eapi-xml-5 |
6 |
> > |
7 |
> > would send the current file ( foo.ebuild ) to the process |
8 |
> > "eapi-xml-5" ( as defined by the current $PATH setting ) |
9 |
> |
10 |
> All we need is a way for the package manager to probe the EAPI. |
11 |
> Spawning a process to do that is just overkill. |
12 |
|
13 |
And we could just use a good regex for that instead. |
14 |
|
15 |
Something like: [eE][aA][pP][iI] <whitespace-or-symbols> [a-z0-9-+]+ |
16 |
|
17 |
and just require users for this to be the first thing declared in |
18 |
an ebuild. Of course, this could make problems with stuff like: |
19 |
|
20 |
# EAPI 4 because of foobarbaz |
21 |
EAPI=4 |
22 |
|
23 |
(on the other hand, in this particular case it will fetch '4' anyway). |
24 |
|
25 |
And this will work as well with: |
26 |
|
27 |
<eapi>15-xml</eapi> |
28 |
|
29 |
and |
30 |
|
31 |
- eapi: 15-yaml |
32 |
|
33 |
-- |
34 |
Best regards, |
35 |
Michał Górny |