1 |
Ciaran McCreesh wrote: |
2 |
> On Thu, 20 Dec 2007 00:07:35 +0000 |
3 |
> Steve Long <slong@××××××××××××××××××.uk> wrote: |
4 |
>> Do you think a generated EAPI is a good idea? I'm curious as to |
5 |
>> how that would be reflected in the filename (as well as your reasons |
6 |
>> ofc.) |
7 |
> |
8 |
> I'm suggesting that if EAPI is a variable, there are use cases for being |
9 |
> able to set the variable in ways other than right at the top of the |
10 |
> ebuild. If it isn't a variable then those use cases aren't relevant. |
11 |
> |
12 |
Point is that your filename format restricts it in exactly the same manner. |
13 |
So let's just stick with the use cases which /that/ supports, which can |
14 |
more easily be supported with the original design and the simple |
15 |
restriction people keep asking for. |
16 |
|
17 |
>> No: without knowing the EAPI when generating said data. If that needs |
18 |
>> to be known relatively soon in order to generate the rest, extract it |
19 |
>> early. You still only need to load the file from disk once, and you |
20 |
>> don't need to source to get that data, given one simple restriction |
21 |
>> (only declaring it once.) |
22 |
> |
23 |
> You can't get the EAPI from the ebuild without knowing what EAPI the |
24 |
> ebuild uses. That's one of the points you're missing. |
25 |
> |
26 |
Wow that doesn't half sound like nonsense. On the one hand you want a |
27 |
restricted filename suffix, on the other it *has* to be full bash parsing. |
28 |
|
29 |
An EAPI="blah" at top-level in the file is exactly the same as the suffix in |
30 |
terms of what can be represented (actually more capable: it also enables eg |
31 |
prefix EAPIs which I understand was one of the main motivations to extend |
32 |
the format away from a defined ordering.) If the EAPI introduces a further |
33 |
eapi function, all well and good; the same datum is still required, whether |
34 |
kept in the filename or in the ebuild. |
35 |
|
36 |
According to the original discussion this was always supposed to be a |
37 |
variable set in the ebuild source: |
38 |
"We would like to introduce a new ebuild variable named EBUILD_FORMAT, |
39 |
that tags the ebuild with a specific ebuild API version it provides or |
40 |
uses."[1] |
41 |
|
42 |
At that time others made the case for restricting its format in exactly the |
43 |
same way you have been resisting for the ebuild source, but see as fine for |
44 |
tacking onto the end of the filename: |
45 |
"I would also suggest requiring that EAPI can be retrieved by a simple |
46 |
line by line parsing without using bash. (This allows for changing the |
47 |
parsing system)"[2] |
48 |
|
49 |
The idea of a different suffix was discussed back then as well: |
50 |
"portage *should not* ignore those ebuilds. If the user |
51 |
wants to merge something that is a later ebuild api then they have, at |
52 |
least portage chucks an exception that the UI can wrap into 'upgrade |
53 |
portage'. |
54 |
|
55 |
With what you're proposing, we instead get bugs about portage missing |
56 |
packages."[3] |
57 |
|
58 |
(That was written when there were no other PMs besides portage3/pkgcore) |
59 |
|
60 |
http://www.mail-archive.com/gentoo-dev%40lists.gentoo.org/msg03946.html |
61 |
has a fuller discussion. |
62 |
|
63 |
> It's an ebuild issue, not a package manager issue. |
64 |
> |
65 |
You keep saying that; sure EAPI is visible to ebuild and maintainer (doh) |
66 |
but the reason you have stated for this change in file naming (which is a |
67 |
lot more far-reaching than a simple restriction on the format of a |
68 |
variable) is so that the *PM* doesn't have to source the ebuild to get the |
69 |
EAPI. |
70 |
|
71 |
Several people have independently suggested the same solution that would |
72 |
work fine in the existing framework, which was in fact proposed in 2005: |
73 |
"Mainly, limiting the syntax has the undesired affect of deviating from |
74 |
what users/devs know already; mistakes *will* occur. QA tools can be |
75 |
written, but people are fallable; both in writing a QA tool, and |
76 |
abiding by the syntax subset allowed."[3] |
77 |
I don't think those are really an issue nowadays; devs know to run repoman, |
78 |
and so do sunrise submitters. |
79 |
|
80 |
I haven't seen one lucid explanation from you for why it wouldn't work, |
81 |
beyond ramblings about requiring full bash sourcing capability for what you |
82 |
yourself envisage as being a static variable, fixed per file. |
83 |
|
84 |
>> I accept it would make metadata generation quicker, but the |
85 |
>> end-user can already use -metadata-transfer atm and never need to run |
86 |
>> that process. It would save many more cycles if more users did imo |
87 |
> |
88 |
> You're confusing the two different types of metadata. Which again shows |
89 |
> that you need to start understanding the metadata process before trying |
90 |
> to discuss design decisions relating to it... |
91 |
> |
92 |
It doesn't make any practical difference[4]: the computational issue is how |
93 |
to avoid a source statement via bash from another language. |
94 |
|
95 |
I note in passing that a metadata cache is available, with no runtime |
96 |
requirement on the user's part, since it is taken from the rsync'ed data. |
97 |
|
98 |
>> (optimising early here seems silly tbh, given that paludis now |
99 |
>> requires ruby.) |
100 |
> |
101 |
> Eh? Now what're you on about? |
102 |
> |
103 |
http://bugs.gentoo.org/show_bug.cgi?id=198864 |
104 |
|
105 |
>> Given that, as a user I see no benefit to my machines that would |
106 |
>> justify the maintenance headache which I know as a coder this will |
107 |
>> result in. |
108 |
> |
109 |
> There is no maintenance headache. |
110 |
> |
111 |
Yeah, keep saying it. That'll make it true.. |
112 |
|
113 |
>> Quite apart from all the changes to supporting tools and workflow, |
114 |
>> it's pushing an implementation-specific datum into a namespace where |
115 |
>> it's neither needed nor useful, apart from to the implementation. |
116 |
> |
117 |
> It's an ebuild issue, not a package manager issue. |
118 |
> |
119 |
Hmm see above. I note you accept that it requires changes to supporting |
120 |
tools and workflow. |
121 |
|
122 |
>> >> > Ebuilds are not config files. |
123 |
>> >> > |
124 |
>> >> Indeed not, but they can be parsed as such for simple, core, |
125 |
>> >> metadata. |
126 |
>> > |
127 |
>> > There is currently no information available from an ebuild that can |
128 |
>> > be parsed by any tool other than bash. |
129 |
>> > |
130 |
>> OK, but restricting EAPI= across the board (in the way that others |
131 |
>> have already asked for) and enforcing it via repoman would mean EAPI |
132 |
>> could easily be extracted. |
133 |
> |
134 |
> Except that it's an arbitrary, pointless restriction. |
135 |
> |
136 |
Er arbitrary, no, since in practise it means exactly the same thing as the |
137 |
filename suffix (one single string declaration.) Pointless not at all, |
138 |
since it allows you to avoid calling bash and waiting for it to source, |
139 |
without an ugly hack. It also keeps the existing work practises that |
140 |
everyone is used to and doesn't mandate any changes to support tools. |
141 |
|
142 |
Given that what we currently have actually supports more than the suffix |
143 |
does, I would class the proposal as pointless restriction, requiring |
144 |
code-changes for zero benefit to devs and users, while arbitrarily setting |
145 |
the prefix project back. And let's not pretend that making code changes |
146 |
across the board will be that easy; regressions are no fun, and nor are new |
147 |
bugs, especially when they result from changes imposed for no technical |
148 |
merit. |
149 |
|
150 |
>> Hmm I think you should consider the example that this sub-thread is |
151 |
>> about, and whether an apology would be in order. |
152 |
> |
153 |
> Huh? |
154 |
> |
155 |
Gee is it really that hard to look back at the example from your colleague |
156 |
that started this sub-thread? Yet you expect everyone else to keep track of |
157 |
every delightful comment from you.. *sigh* |
158 |
|
159 |
>> Since only declaring it the once /seems/ ok with you, what on Earth |
160 |
>> is so hard about extracting it? |
161 |
> |
162 |
> With the current situation, the EAPI has to be known for the EAPI to be |
163 |
> calculated. Adding in a pre-pass layer enforcing new file format |
164 |
> restrictions does not solve the problem we're trying to address. |
165 |
> |
166 |
There is no pre-pass layer enforcing restrictions (nice FUD though); repoman |
167 |
or QA-toolFoo would do the check before the ebuild even got into the tree. |
168 |
And again, as others pointed out when this was first discussed, and still |
169 |
others have pointed out on this list, it really isn't that hard to get a |
170 |
simple EAPI="foo" out of a file, and the restriction is exactly the same |
171 |
for the maintainer as with your hacked on suffix. The QA check before |
172 |
committing can trivially enforce the singleton restriction and we can use |
173 |
EAPI as it was intended with no change to workflow and much less work. |
174 |
|
175 |
|
176 |
[1] http://www.mail-archive.com/gentoo-dev%40lists.gentoo.org/msg02668.html |
177 |
[2] http://www.mail-archive.com/gentoo-dev%40lists.gentoo.org/msg03868.html |
178 |
[3] http://www.mail-archive.com/gentoo-dev%40lists.gentoo.org/msg03873.html |
179 |
[4] But thanks for the explanation, that really cleared things up. I'll |
180 |
assume you're talking about metadata generation during depgraph resol'n |
181 |
then, until you scold me for misunderstanding again. And I note that you |
182 |
have been disparaging of discussion of bash optimisations in eclass/ebuild |
183 |
code, yet are falling over yourself to give everyone else a load of work to |
184 |
speed up what I thought was already the fastest PM known to humanity. |
185 |
|
186 |
|
187 |
-- |
188 |
gentoo-dev@g.o mailing list |