Gentoo Archives: gentoo-dev

From: Peter Alfredsen <loki_val@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Issues regarding glep-55 (Was: [gentoo-council] Re: Preliminary Meeting-Topics for 12 February 2009)
Date: Mon, 23 Feb 2009 16:06:19
Message-Id: 20090223170617.27ae85ae@gentoo.org
In Reply to: Re: [gentoo-dev] Re: Issues regarding glep-55 (Was: [gentoo-council] Re: Preliminary Meeting-Topics for 12 February 2009) by Steve Dibb
1 On Mon, 23 Feb 2009 08:43:09 -0700
2 Steve Dibb <beandog@g.o> wrote:
3
4 > Plus, I don't really grasp the whole "we have to source the whole
5 > ebuild to know the EAPI version" argument. It's one variable, in one
6 > line. Can't a simple parser get that and go from there?
7
8 The problem is that its technically allowed for the value of $EAPI to be
9 dependent on other bits and pieces. For instance:
10
11 if [[ $PV = 2.6 ]]
12 then
13 EAPI=2
14 else
15 EAPI=1
16 fi
17
18 The quick-n-dirty solution to that is to just say that EAPI is not just
19 a bash variable, it's also a magic string, so manipulating it in bash
20 is forbidden. And please place it in line 5 of your ebuild, kthxbye.
21
22 To be honest I see no good reason for allowing manipulation of it, but
23 I'm sure other people will tell me why adding this requirement at this
24 point is wrong even though no ebuilds in the tree to the best of my
25 knowledge use EAPI as anything more than a declaration that's placed
26 Just before inherit, right after the header.
27
28 /loki_val

Replies