On Thu, Mar 8, 2012 at 1:35 PM, Michael Orlitzky <mich...@orlitzky.com> wrote:
> On 03/08/2012 01:48 PM, Ciaran McCreesh wrote:
>>
>>
>>> If they're code, they're code, and we need to execute them somehow.
>>
>>
>> The notion of "execute them somehow" that's used doesn't fit in with
>> the #! interpreter model. You aren't executing ebuilds via an
>> interpreter. You're performing an action that involves using the data
>> and code in an ebuild multiple times and in multiple different ways,
>> and that may also involve doing the same to an installed package that
>> is being replaced.
>>
>
> I do understand that; but the fact that the data are computed in an ugly
> turing-complete language complicates things.
>
> Did someone already propose replacing EAPI=foo with a function call akin to
> inherit?

the eapi function doesn't exist in earlier eapis, so you end up doing
the rename thing. Otherwise old package managers barf on the new
syntax. I still think going with a comment is better than this.

>
>  eapi 4
>  inherit whatever
>  ...
>
> the call to eapi() would then set $EAPI accordingly. If the ebuild is being
> executed directly, it could exit $EAPI; otherwise, it would continue
> normally. That would give us an interface to the variable, and we wouldn't
> need to know the EAPI ahead of time to do it as long as it's the first
> function called in the ebuild.
>
> This is of course isomorphic to requiring a specific EAPI=4 format, but does
> allow you to do stupid things like x=`seq 4 4`; eapi $x; if you want.
>

Reply via email to