Gentoo Archives: gentoo-dev

From: Brian Harring <ferringb@×××××.com>
To: Kent Fredric <kentfredric@×××××.com>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFD : .ebuild is only bash
Date: Tue, 13 Mar 2012 06:23:14
Message-Id: 20120313062233.GJ7579@localhost
In Reply to: Re: [gentoo-dev] RFD : .ebuild is only bash by Kent Fredric
1 On Tue, Mar 13, 2012 at 06:14:23PM +1300, Kent Fredric wrote:
2 > On 13 March 2012 17:31, Brian Harring <ferringb@×××××.com> wrote:
3 > > Worse, it actually makes parsing _worse_ than it already is. ??What G55
4 > > had going for it was ease of filtering out unsupported eapi's.
5 > > Literally just filter the readdir results. ??This behemoth Zac is
6 > > proposing basically requires throwing regex at it, and *is* able to
7 > > be tripped up since eapi's aren't strictly integers (1-prefix,
8 > > 4-python, 4-eapi3 if I wanted to intentionally be a dick and break
9 > > likely non-greedy implementations of the regex).
10 >
11 > Eh? How? If you make "." a forbidden character in an eapi
12 > specificiation, and make "." the delimiter
13 >
14 > dev-foo/foo-bar-2.3.4.eapi5.eb
15 >
16 > ^^^^
17 >
18 > How does that require regex?
19
20 That works; note however that wasn't what was proposed. ;)
21
22 Still is god awfuly fugly though, and reliant on digits as the first
23 character to be readable. Consider exheres:
24
25 dev-foo/foo-bar-2.3.4.eapiexheres.eb
26
27 Or arfrever's personal EAPI:
28
29 dev-foo/foo-bar-2.3.4.eapi4-python.eb
30
31 Etc. This isn't an improvement, it's a regression in readability
32 bordering on intentionally hating the developer who has to deal with
33 it.
34
35
36 > remove the .eb , and the last token remaining is the eapi .
37 >
38 > it doesn't clash with the existing system for 2 reasons, 1) the .eb
39 > extension and 2) "eapi5" is not a valid version token
40 >
41 > > Same angle, embedding it into the version space means that there can
42 > > be conflicts w/ PN.
43 >
44 > I'm confused as to how, can you give one theoretical example?
45
46 If you change the delimiter, it's not an issue; if it was left,
47 consider dev-foo/blah-eapi2-1-eapi2.ebuild . It's intentionally
48 breaking it, but the point is that the issue *exists*, a problem that
49 didn't before. Change the delimiter and you can duck most of it
50 although I suspect there still is a naggle or two.
51
52 That doesn't make parsing any prettier to implement however.
53
54
55 > dev-foo/foo-bar-2.3.4.eapi5.eb <-- eapi5 can't be a package name
56 > here, because its got the .eb suffix which means an EAPI *MUST* be
57 > specified
58 >
59 > and eapi5 also can't be a package name there, because then you're
60 > telling be it tokenizes as:
61 >
62 > category=dev-foo
63 > package=foo-bar-2.3.4.eapi5
64 > version = undefined
65 > eapi = undefined
66 >
67 > Which is clearly illegal.
68
69 Just a general point. You changed the delimiter- meaning the
70 failures mostly go away. My points were against Zac's original
71 proposal, thus arguing those points don't actually exist (swapping the
72 delimiter) is a bit of a wrong way to argue- argue "change the
73 delimiter and it goes away" rather than "nuh uh, there isn't an
74 issue". Way less confusing.
75
76
77 > > Basically... embedding it into the versioning like that, besides being
78 > > ugly as all hell, discards the main benefit g55 had- clear
79 > > identification of EAPI.
80 >
81 > It still seems "clear" to me.
82
83 "clear" means different things to different people. For example, this
84 code is actually clear to me:
85
86 class MockObject(dict):
87 locals().update(
88 ('__%sattr__' % x, getattr(dict, '__%sitem__' % x) for x in
89 ('get', 'set', 'del'))
90
91 That code for everyone else is basically akin to eye-gouging w/ a
92 follow up diddling of the new hole. 'Clear' is quite subjective being
93 hte point.
94
95 EAPI mechanisms have to be designed for functionality, *and* ease of
96 use for the general dev populace. Having
97
98 sys-apps/paludis-0.72.0-eapiexheres.ebuild
99
100 is *not* clearly parsable by the majority. Were it parsable for the
101 masses, that doesn't make it anything less than butt-fugly in my view.
102
103 If you really think it's great, convince others. Ulm/Myself seem to
104 view it fairly negatively, and I strongly doubt you're going to
105 convince either of us to change those views.
106
107 ~brian

Replies

Subject Author
Re: [gentoo-dev] RFD : .ebuild is only bash "Wulf C. Krueger" <wk@×××××××××××.de>