Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds
Date: Mon, 12 Mar 2012 03:06:54
Message-Id: CAGfcS_=+7E-=zTMLEEFwM8xG4R21AJ3xWaS_HCE8P7PUEtNSyA@mail.gmail.com
In Reply to: Re: [gentoo-dev] RFD: EAPI specification in ebuilds by Brian Harring
1 On Sun, Mar 11, 2012 at 10:03 PM, Brian Harring <ferringb@×××××.com> wrote:
2 > Pragmatic reality, the eapi function actually would work fine.  As
3 > pointed out elsewhere, bash parses as it goes- which isn't going to
4 > change.
5
6 Unless the ebuild isn't written in bash...
7
8 How do you source the ebuild if you don't know what to use to source
9 it? How do you know what to use to source it if you don't know the
10 EAPI? Right now all the existing EAPIs use bash, but there is no
11 reason the file couldn't be xml, or python, or just about anything
12 else.
13
14 If we want to allow for that kind of flexibility, then it might make
15 sense to go ahead and state that our convention is to stick EAPI=5 in
16 one of the first few lines of the ebuild, or inside a comment, but
17 also go a step further and state that the text "EAPI=" cannot appear
18 elsewhere in the ebuild (or perhaps within the first 10 lines). Just
19 about any file format we might use would allow us to make "EAPI="
20 appear in it, but not all could guarantee that it would occur at the
21 start of a line, or at the start of a line immediately after a #.
22
23 In any case, I can really see the KISS value in a very rigid syntax
24 that is trivial to parse. Stuff like this almost makes me wish our
25 ebuilds already were xml files or such, with bash embedded inside
26 sections. Finding a particular tag in an xml file is trivial as the
27 fundamentals haven't changed in 15 years.
28
29 Rich

Replies

Subject Author
Re: [gentoo-dev] RFD: EAPI specification in ebuilds Alec Warner <antarus@g.o>
Re: [gentoo-dev] RFD: EAPI specification in ebuilds Kent Fredric <kentfredric@×××××.com>