Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds
Date: Fri, 09 Mar 2012 15:06:36
Message-Id: 4F5A1C46.7080005@gentoo.org
In Reply to: Re: [gentoo-dev] RFD: EAPI specification in ebuilds by Michael Orlitzky
1 On 03/09/2012 06:42 AM, Michael Orlitzky wrote:
2 > On 03/09/12 00:51, Zac Medico wrote:
3 >> On 03/08/2012 09:35 PM, Michael Orlitzky wrote:
4 >>> The function can do any crazy thing you want.
5 >>
6 >> We don't need a function. We need to know the EAPI before we source the
7 >> ebuild, and a function doesn't give us that.
8 >
9 > Surely we can source one or two lines of the ebuild safely, like the
10 > example shows?
11
12 Why would we though, when sourcing is a relatively costly operation, and
13 there are much more efficient ways to get the EAPI?
14
15 Also, you've got a chicken and egg problem, since you're assuming that
16 your eapi() function is going to be available in the global environment
17 when the ebuild is sourced. The whole point of knowing the EAPI in
18 advance is so that we will be able to make changes to the global
19 environment, such as add, remove, or change the behavior of _any_ function.
20 --
21 Thanks,
22 Zac

Replies

Subject Author
Re: [gentoo-dev] RFD: EAPI specification in ebuilds Michael Orlitzky <michael@××××××××.com>