Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds
Date: Thu, 08 Mar 2012 00:18:44
In Reply to: Re: [gentoo-dev] RFD: EAPI specification in ebuilds by Michael Orlitzky
1 >>>>> On Wed, 07 Mar 2012, Michael Orlitzky wrote:
3 > Someone suggested using a standard shebang the last time this came
4 > up, and if I remember correctly it was one of the least-disagreeable
5 > solutions proposed. We could of course define our own custom format,
6 > but I think something like,
8 > #!/usr/bin/eapi5
10 > would be perfect if we could hand off the interpretation of the
11 > ebuild to that program. That solves the problem with new bash
12 > features, too, since you could point that command at a specific
13 > version.
15 Please note that I've formulated the specification in a way that
16 accounts for this:
18 >> - The first line of the ebuild must contain the word "ebuild",
19 >> followed by whitespace, followed by the EAPI, followed by
20 >> end-of-line or whitespace.
22 This would also match the line "#!/usr/bin/ebuild 5" (if the magic
23 word should be "ebuild" or "eapi" can be discussed of course).
24 So even if we would introduce the shebang only in a later EAPI,
25 previous portage versions would still recognise the new header.
27 Ulrich