Gentoo Archives: gentoo-dev

From: Brian Harring <ferringb@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: RFD: EAPI specification in ebuilds
Date: Mon, 19 Mar 2012 03:23:06
Message-Id: 20120319032158.GG7731@localhost
In Reply to: Re: [gentoo-dev] Re: RFD: EAPI specification in ebuilds by Kent Fredric
1 On Mon, Mar 19, 2012 at 02:36:34PM +1300, Kent Fredric wrote:
2 > On 19 March 2012 14:12, Steven J Long <slong@××××××××××××××××××.uk> wrote:
3 > >
4 > > As for non-bash ebuilds, I have always agreed with antarus that they should
5 > > simply use a different extension. Adding a new extension per source language
6 > > is a *lot* cleaner than one per EAPI.
7 >
8 > Ok: If we take this notion and enshrine it in stone:
9 >
10 > If we assume Bash 4 is a seperate language from Bash 3, as its
11 > syntax-backwards-incompatible, is it fair to suggest that for some
12 > future EAPI which require Bash 4, that the extension change to suit?
13 >
14 > ie: move from .ebuild to .ebuild4 , where '.ebuild' conveys the
15 > format is bash, and that '.ebuild4' is bash4 only?
16 >
17 > That way you have a forwards declaration of the syntax/file format
18 > required to parse the file, but no declaration of the EAPI, so you're
19 > not breaking encapsulation.
20 >
21 > This is breaking the direct file==eapi connection, but still
22 > maintaining a loose file<->eapi connection.
23 >
24 > Its /sort/ of like the "one time extension change" proposal, except
25 > its less 'arbitrary' than something like .eb , and it gives us the
26 > future option of changing the suffix again if bash 5 comes out with
27 > different syntax.
28 >
29 > Then we can do
30 >
31 > .ebuild = EAPI 0 - 4 & bash >= 3
32 > .ebuild4 = EAPI5 - 9 & bash >= 4
33 > .ebuild5 = EAPI10 - 15 & bash >= 5
34 >
35 > Thoughts?
36
37 This is a bad idea; it arbitrarily bleeds the bash version into the
38 ebuild name, still requires an EAPI mechanism w/in the actual file,
39 and is likely to break tools that have assumptions about extensions
40 (even ones sooner or later written against such a setup).
41
42 Besides; it's not bash version as much as global scope settings,
43 functions, etc, that are the issue.
44
45 Syntax is generally minor in comparison.
46 ~harring