Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI)
Date: Thu, 20 Dec 2007 09:49:44
Message-Id: pan.2007.12.20.09.43.58@cox.net
In Reply to: Re: [gentoo-dev] Re: Re: Re: [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) by Ciaran McCreesh
1 Ciaran McCreesh <ciaran.mccreesh@×××××××××××××.uk> posted
2 20071220035400.7ef9c32b@×××××××××××××.uk, excerpted below, on Thu, 20 Dec
3 2007 03:54:00 +0000:
4
5 > On Wed, 19 Dec 2007 20:28:55 -0500
6 > Richard Freeman <rich@××××××××××××××.net> wrote:
7 >> Ciaran McCreesh wrote:
8 >> > On Wed, 19 Dec 2007 18:59:47 -0500
9 >> > Richard Freeman <rich@××××××××××××××.net> wrote:
10 >> >> Am I missing something?
11 >> >
12 >> > Yes. You're missing all the explanations that have already been given
13 >> > about why it's impossible to parse ebuilds using anything other than
14 >> > bash.
15 >>
16 >> If the EAPI can be parsed from a filename without using bash, why
17 >> couldn't it be parsed from a line in the ebuild contents without using
18 >> bash?
19 >
20 > Because a) a future EAPI might want to change EAPI into a function
21 > rather than a variable, b) there are a zillion ways of setting a
22 > variable in bash and people already use all of them and c) introducing
23 > new weird format requirements is silly.
24
25 So you're proposing putting the function into the filename?
26
27 As he stated, the only credible reason (so far given) bash must be used
28 to parse EAPI is if it's dynamic, say a function, and that won't work so
29 well in a filename either. Thus, putting EAPI in the filename pretty
30 much eliminates the possibility of it being a function, and we're back to
31 the original question, instead of a GLEP allowing it in the filename, why
32 not a GLEP specifying the format of that single variable in the file
33 contents well enough to parse without bash?
34
35 Or, if you are proposing that the pre-source EAPI in the filename could
36 be superseded by a function, if that is specifically allowed by the (pre-
37 source) EAPI defined in the filename, then we are back to what I
38 suggested earlier, that you specifically said wasn't necessary (and I
39 basically deferred to your judgement), that the pre-source and post-
40 source EAPI be specifically allowed to be different.
41
42 Either the EAPI must be static, so it can be set in the filename, or it
43 can be set dynamically, in which case allowing the pre-source and post-
44 source EAPI to be different actually makes sense.
45
46 That said, I do agree that putting it in the filename seems safer, as if
47 the PM doesn't understand that EAPI, it can stop right at the filename,
48 and doesn't have to worry about parsing the contents of the file itself
49 at all, period. That's safer than having to parse it at least minimally,
50 to find out at least the EAPI, before deciding whether it can go
51 further. Thus, regardless of the function thing, I support EAPI in the
52 filename as simply safer.
53
54 --
55 Duncan - List replies preferred. No HTML msgs.
56 "Every nonfree program has a lord, a master --
57 and if you use the program, he is your master." Richard Stallman
58
59 --
60 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Re: [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) Ciaran McCreesh <ciaran.mccreesh@×××××××××××××.uk>