Gentoo Archives: gentoo-dev

From: pioto@×××××.org
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] A few questions to our nominees
Date: Tue, 10 Jun 2008 00:21:27
Message-Id: Pine.LNX.4.64.0806092004090.10016@woodhaven.pioto.org
In Reply to: Re: [gentoo-dev] A few questions to our nominees by Joe Peterson
1 On Mon, 9 Jun 2008, Joe Peterson wrote:
2
3 > Technical reasons to avoid the filename:
4 >
5 > 1) Increase of [needless] complexity in filenames/extensions (and only one
6 > example of the impact is that searching for ebuild files becomes less
7 > straightforward), when things like SLOT, EAPI, etc., etc., seem to
8 > naturally belong as part of the script contents/syntax.
9
10 Okay... so:
11 find /usr/portage -name *ebuild
12
13 becomes:
14 find /usr/portage -name *ebuild*
15
16 That doesn't seem that much harder to me... Same for the file detection
17 for editors.
18
19 > 2) Having the same info in more than one place is generally a bad idea in
20 > any design - this is true in any discipline. [...]
21
22 If you read the proposal more closely, you would notice that it
23 specifically says to *not* specify EAPI in more than one place. It belongs
24 solely in the filename suffix. The only reason the EAPI variable would be
25 recognized inside the file itself is to allow for backwards compatibility
26 with the current way EAPI=1 is done -- this behavior would be discouraged
27 in all future ebuilds.
28
29 > 3) It uses the extension in a way that goes against common use in computers,
30 > especially *nix. No longer could we then say that a file of type
31 > "Gentoo ebuild" has the extension "ebuild"
32 > (simple/straightforward/standard).
33
34 In most unixes, the file extension is completely meaningless. What matters
35 is the contents of the file. Nautilus, etc, mostly use detection based
36 upon the files contents to identify file types (at least for local files),
37 not file extensoins.
38
39 > 4) It seems that the motivation for this GLEP is so that the tools can
40 > determine the EAPI without reading/sourcing the script. In order to
41 > get around this, the GLEP suggests exposing this technical information
42 > in the filename. This is the wrong place to expose it, and the reasons
43 > given are not that this detail should be exposed there but rather because
44 > it is inefficient to source the file to get the info. So this is a case
45 > of trying to solve a technical issue by changing the interface. I
46 > believe it would be more correct to attack the technical problem in a way
47 > that does not do this, and I am sure this can be solved.
48
49 The reason for this is that, while the current two EAPIs don't cause
50 trouble if you try to source them when you don't support them, that
51 doesn't mean future ones won't. I'm not talking about anything silly like
52 rewriting ebuilds in python, but things like changing syntax for DEPEND
53 could potentially confuse older package managers. By adding the EAPI
54 specification to the filename instead, old package managers just plain
55 won't see packages they don't understand, so there's no need to worry
56 about this.
57
58 Also, sourcing a package to extract one metadata key takes much more time
59 than just not loading it in the first place.
60
61 > Other reasons:
62 >
63 > 1) Littering the filename with this kind of stuff is potentially confusing to
64 > both devs and users - I know it's been stated that users shouldn't care,
65 > but I don't think that's a good reason/assumption.
66
67 New eapis aren't necessarily of any immediate use to people. Those who
68 don't see the need for them can continue to just use EAPI=0, plain old
69 .ebuild files of the sort that've been around for years, and for many
70 packages this is totally appropriate. The only devs who should care are
71 the ones who have a need for the new features.
72
73 Users shouldn't ever have to read the ebuild files themselves. The package
74 manager should tell them everything they need to know.
75
76 > 2) It is not an elegant filename policy. Many systems have elegance as
77 > a design goal.
78
79 That's a matter of opinion. It seems perfectly elegant to me -- not to
80 mention the various, rather clear technical benefits of it.
81
82 > 3) Assuming going this route is a mistake, it could be hard to reverse.
83
84 Not really. The entire point of this scheme is that we can change at any
85 time w/o breaking stuff. If we decide to go with .pbuild files for the
86 future, we can just do that. Old package managers still won't care.
87
88 --
89 Mike Kelly
90 --
91 gentoo-dev@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] GLEP 55 (was: A few questions to our nominees) Joe Peterson <lavajoe@g.o>