Gentoo Archives: gentoo-dev

From: Steven J Long <slong@××××××××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: The fallacies of GLEP55
Date: Fri, 15 May 2009 19:30:41
Message-Id: 1461811.mMo8WK9hvy@news.friendly-coders.info
In Reply to: Re: [gentoo-dev] The fallacies of GLEP55 by Robert Bridge
1 Robert Bridge wrote:
2
3 > Patrick Lauer wrote:
4 >> On Thursday 14 May 2009 20:39:07 Ciaran McCreesh wrote:
5 >>> On Thu, 14 May 2009 20:06:51 +0200
6 >>>
7 >>> Patrick Lauer <patrick@g.o> wrote:
8 >>>> Let EAPI be defined as (the part behind the = of) the first line of
9 >>>> the ebuild starting with EAPI=
10 >>> Uh, so horribly utterly and obviously wrong.
11 >>>
12 >>> inherit foo
13 >>> EAPI=4
14 >>>
15 >>> where foo is both a global and a non-global eclass that sets metadata.
16 >>
17 >> Interesting, but quite subtly wrong. I'm surprised that you try to slip
18 >> such an obvious logical mistake in in an attempt to save your arguments.
19 >
20 > Patrick, in the interest of making this comprehensible to the average
21 > schmuck like me, which you seem to be trying to do, could you actually
22 > explain WHY this is wrong? Otherwise it looks like you are simply trying
23 > the arrogant "I am right because I say so" line.
24 >
25 AFAIK, setting EAPI has to be done before any call to inherit. Not to do
26 so is considered a QA violation, and I believe repoman will scream at you
27 if you do so (I could be wrong as I don't use it. If it doesn't, perhaps it
28 should.)
29
30 Furthermore, eclasses are not supposed to set EAPI. They can test what the
31 ebuild's EAPI is, and act accordingly, should the need arise, but they are
32 not supposed to set it. (I'm informed this is disallowed by GLEP-55 in any
33 event, so it's not a restriction anyone cares too much about, one would
34 surmise.)
35
36 From conversation with Harring, who invented the whole EAPI thing, they were
37 never meant to change very quickly. The complementary mechanism was elibs,
38 that is files with useful library functions, which is often how eclasses
39 are used nowadays. Eclasses in that context would be able to set EAPI,
40 since they would effectively be a template, not a repository of
41 functionality.
42
43 (This is my no doubt flawed understanding of what he said; I'm sure he'll
44 correct, and hopefully forgive, any errors which are of course my own.)
45
46 I am curious as to why eclass versioning, which has been proposed for
47 donkey's years, hasn't seen as much impetus as what appear from a software
48 engineering perspective to be quite esoteric, and poorly thought-through,
49 use-cases. There does appear to be a process issue, though resolution is
50 another matter.
51
52 Good luck with the distro. :-)
53
54 --
55 #friendly-coders -- We're friendly but we're not /that/ friendly ;-)