On Mon, 23 Feb 2009 15:53:20 +0000
Ciaran McCreesh <ciaran.mccre...@googlemail.com> wrote:

> On Mon, 23 Feb 2009 08:43:09 -0700
> Steve Dibb <bean...@gentoo.org> wrote:
> > Plus, I don't really grasp the whole "we have to source the whole
> > ebuild to know the EAPI version" argument.  It's one variable, in
> > one line. Can't a simple parser get that and go from there?
> 
> Not true. This is entirely legal:
> 
> In pkg-1.ebuild:
> 
>     EAPI="${PV}"
>     printf -v EAPI '%s' 4
>     inherit foo
>     EAPI="2"

Which begs the question: is it really worth allowing it?
If we only allow constant assignments (which is an implicit restriction
in the file extension version) then this can be parsed easily with
grep/tr/awk/etc and can be the magic eapi guessing. Of course the tree
has to be checked before implementing this and we'll have to wait a
good amount of time before breaking the current eapi bash-parsing but
I'm not aware of any eapi proposal that would break the current behavior
and would be usable in the main tree within a reasonable amount of
time such that we can't ignore backward compatibility.


> In foo.eclass:
> 
>     EAPI="3"

I thought this was prohibited.

Alexis.

Attachment: signature.asc
Description: PGP signature

Reply via email to