On 03/09/2012 06:42 AM, Michael Orlitzky wrote:
> On 03/09/12 00:51, Zac Medico wrote:
>> On 03/08/2012 09:35 PM, Michael Orlitzky wrote:
>>> The function can do any crazy thing you want.
>>
>> We don't need a function. We need to know the EAPI before we source the
>> ebuild, and a function doesn't give us that.
> 
> Surely we can source one or two lines of the ebuild safely, like the
> example shows?

Why would we though, when sourcing is a relatively costly operation, and
there are much more efficient ways to get the EAPI?

Also, you've got a chicken and egg problem, since you're assuming that
your eapi() function is going to be available in the global environment
when the ebuild is sourced. The whole point of knowing the EAPI in
advance is so that we will be able to make changes to the global
environment, such as add, remove, or change the behavior of _any_ function.
-- 
Thanks,
Zac

Reply via email to