Gentoo Archives: gentoo-dev

From: Federico Ferri <xaero@××××××.it>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Re: [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2]
Date: Sat, 29 Dec 2007 23:19:04
Message-Id: 4776D546.803@inwind.it
In Reply to: Re: [gentoo-dev] Re: Re: [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2] by Ciaran McCreesh
1 Ciaran McCreesh ha scritto:
2 > On Thu, 27 Dec 2007 18:03:27 +0000
3 > Roy Marples <roy@×××××××.name> wrote:
4 >
5 >> Using your analogy you should then recognise that there is a strong
6 >> dislike for pink and should seek a new colour that allows the building
7 >> of said extensions.
8 >>
9 >
10 > And what colour would that be? We've already ruled out purple, brown
11 > and yellow, and no-one has yet found any other colour of paint.
12 >
13 sorry if this has already suggested.
14 my idea is to use shebang; the advantage in using shebang is that file
15 doesn't need to be sourced or parsed by complex algorithms in order to
16 extract the necessary information.
17
18 an example:
19
20 #!/usr/bin/ebuild eapi=1
21 # Copyright 1999-2007 Gentoo Foundation
22 # Distributed under the terms of the GNU General Public License v2
23 # $Header: $
24
25 DESCRIPTION="My EAPI-1 ebuild"
26 HOMEPAGE="http://www.gentoo.org/"
27 SRC_URI=""
28 LICENSE="GPL-2"
29 ...
30
31
32 shebang's synopsis would look something like:
33
34 #!<interpreter> [key=value] [key=value] [...]
35
36
37 pros:
38 1) it's standard. shell scripts use it. why ebuilds shouldn't?
39 2) it's easy to parse:
40 eval `head -n1 $ebuild | cut -d\ -f2-`; echo $eapi
41 3) in the future, for any other situation analogous to this, you could
42 add another key=value to the ebuild's shebang
43 4) easily checked by repoman
44
45 cons:
46 ?
47
48 just my two Eurocents.
49 since now you can bite me ;-)
50
51 --
52 #include <stdio.h>
53 main(){printf("%x",4275974592);}
54
55 --
56 gentoo-dev@g.o mailing list

Replies

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