Gentoo Archives: gentoo-dev

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFD : .ebuild is only bash
Date: Tue, 13 Mar 2012 06:56:53
Message-Id: CAATnKFAhfzEr0z5Mp_y=WrqdBmk9JQDk5Xmv536E9bwNX=bMhQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] RFD : .ebuild is only bash by Walter Dnes
1 On 13 March 2012 19:41, Walter Dnes <waltdnes@××××××××.org> wrote:
2 > On Mon, Mar 12, 2012 at 05:12:28PM +0000, Ciaran McCreesh wrote
3 >
4 >> This whole thing is just an exercise in trying to find excuses not to
5 >> use GLEP 55.
6 >
7 >  A filename should not be (ab)used as a database.  The main argument for
8 > GLEP 55 is that it would make ebuild-processing generic.  I.e. making
9 > ebuild info available to whatever future ebuild processor replacement
10 > for bash was used.  A couple of comments...
11 >
12 > 1) Let's talk generic.  Right now, we're talking about EAPI.  In future,
13 > what other (meta)data and characteristics will we need to know?  What
14 > else will be tacked onto the filename?  EAPI, and any other critical
15 > (meta)data should be declared early on in the ebuild.  That's what the
16 > ebuild is for.
17 >
18 > 2) Any potential ebuild processor that's incapable of looking for regex
19 > "^EAPI=" in a textfile, amd parsing the numbers that follow, has no
20 > business being used to process ebuilds.
21 >
22
23
24 Yeah, the only other concept I wanted to see addressed for technical
25 concerns is a per-package metadata file ( that is *not* metadata.xml )
26 that intends to associate out-of-band metadata with files in the
27 package's directory.
28
29 Consider if it were in .json , just for ease of explaining the concept
30
31 category/package/
32 package-foo-1.2.ebuild
33 package-foo-1.2.3.ebuild
34 metamap.json
35
36 And in metamap.json :
37
38 {
39 "_metamap" : { "api-version" : 1 },
40 "package-foo-1.2.ebuild" : { "eapi" : "6" },
41 "package-foo-1.2.3.ebuild" : { "eapi" : "7" }
42 }
43
44 Yes, I'm aware this imposes some limitations on editing files somewhat.
45
46 But I don't think I've seen this specific concept has seen a proper
47 fleshing out/destruction yet.
48
49 Really, I've seen lots of interesting ideas thus far, but I'm having
50 trouble keeping the pros / cons of each variant of each approach in my
51 head, and Glep55 wins by default because it fits better in my
52 short-term-memory =).
53
54 ( Yes, yes, I stuck a _metamap key with attached _metamap api version
55 subkey *just* in case the format of the metamap needs to change. If
56 you want to have a metametamap, well, I guess thats why we have
57 hallucinogens ;) )
58
59 --
60 Kent
61
62 perl -e  "print substr( \"edrgmaM  SPA NOcomil.ic\\@tfrken\", \$_ * 3,
63 3 ) for ( 9,8,0,7,1,6,5,4,3,2 );"