1 |
On Wednesday 31 August 2005 01:46, Brian Harring wrote: |
2 |
> > What the format of the values of EAPI is is irrelevant. The matter is |
3 |
> > that there is no way to know that version 5 is in any way compatible |
4 |
> > with version 4, which in turn is also incompatible with version 3. |
5 |
> > Seeing versions as numbers would imply an ordering in the versions. |
6 |
> > Such an ordering would seem to imply compatibility or something the |
7 |
> > like, while versions could differ significantly. |
8 |
> |
9 |
> There actually is an ordering to the versions though- they're going to |
10 |
> map out to later portage releases (eapi3 release's portage version >= |
11 |
> eapi4 release's portage version >= eapi5 releases' portage version). |
12 |
|
13 |
Of course there is some kind of ordering. My point is that this ordering |
14 |
should be for users only, but portage should totally disregard this. |
15 |
|
16 |
> Why am I being so damned stubborn about numbers for this? Cause I |
17 |
> don't want users having to dink around with knowing that eapi="really |
18 |
> cool version" somehow maps out to 3.1. Further, eapi version *likely* |
19 |
> will wind up as the slotting for any split out portage-ebuild package, |
20 |
> and slots traditionally have always been ints. |
21 |
|
22 |
I don't mind you using numbers or something like "3.1-strict" meaning that |
23 |
it was introduced with portage 3.1. Just do it in such a way that when in |
24 |
the future it is decided that text can be in EAPI specifiers, portage |
25 |
will not choke on newer ebuilds that do that. |
26 |
|
27 |
> > If EAPI's were more than just strings, at some point it might even be |
28 |
> > possible to associate packages with EAPI's so that portage would |
29 |
> > automatically signal the EAPI was unsupported, find the relevant |
30 |
> > package and merge the plugin. Restart itself and merge the ebuild |
31 |
> > that needed the new EAPI. The plugin ebuild could ensure that the |
32 |
> > portage version is compatible. |
33 |
> |
34 |
> The slotting comment above is in regard to it. People will hit |
35 |
> annoyances along the way, but slot==EAPI for portage-ebuild ought to |
36 |
> allow a sane resolver to dig it's way back. |
37 |
|
38 |
My main focus is not on automatic finding of compatible versions of |
39 |
portage for an EAPI value. It is on ensuring forward compatibility. This |
40 |
is easiest when portage makes very few assumptions on the contents of |
41 |
EAPI. |
42 |
|
43 |
> Won't work for stable, due to the fact stable's resolver isn't smart |
44 |
> enough, but rewrite's should support the "lets hop from portage |
45 |
> version to portage version in upgrading" bit. |
46 |
> |
47 |
> Aside from that, EAPI is specific to *ebuilds*. New format is a |
48 |
> seperate beast that shouldn't be shoe horned into ebuilds imo. |
49 |
|
50 |
EAPI defines which format the ebuild/eclass has. Whether that is a small |
51 |
change or a big change is not that relevant. Currently the formats all |
52 |
have bash-compatible syntax, and I don't argue to remove that. I just |
53 |
want to keep it possible as long as EAPI is recognizable, and bash |
54 |
doesn't bail out on it too early. Hence the reason that I argue that EAPI |
55 |
should be the first item after the whitelines and comments in an ebuild. |
56 |
This allows *fast* and failsafe detection of the required EAPI. Even when |
57 |
what follows is totally incompatible with the default parser. (bash |
58 |
is/contains also a parser) |
59 |
|
60 |
> > > Further reason why string is a no go indicated in the code; if |
61 |
> > > eapi0 portage tries regening an eapi1 cache entry, it stores |
62 |
> > > negated eapi version with no other metadata. Allowing strings |
63 |
> > > nukes that approach, unless you disallow - as the first character |
64 |
> > > (which would be demonstration of strings not being incredibly well |
65 |
> > > suited for eapi settings imo). |
66 |
> > |
67 |
> > As long as it does not generate "-0" this broken behaviour should not |
68 |
> > break anything as long as portage 2.1 does a forced regen or cache |
69 |
> > evaluation on installation (when detecting a 2.0 version present) or |
70 |
> > first run. |
71 |
> |
72 |
> Wouldn't call it broken behaviour; the reasoning behind doing this is |
73 |
> that people, regardless of any warning we give them, *will* have |
74 |
> caches that are used by multiple portage versions. Bad setups will |
75 |
> results in older portage installations updating a central cache; the |
76 |
> negating allows for older portage installations and newer to play nice |
77 |
> in the cache, not pissing each other off as occurs with stable and |
78 |
> |
79 |
> >=2.1 (or any cache change for that matter). |
80 |
> |
81 |
> Granted that's a combination of flat_hash and eapi, but eapi's |
82 |
> negation still is a major factor in the compatibility. |
83 |
|
84 |
This would mean that "-" as the first character in an EAPI string should |
85 |
be disallowed until we can be "certain" that the portage versions in use |
86 |
do not need this feature anymore. |
87 |
|
88 |
> > Is it really harder to check for either "" or unset or "0". That |
89 |
> > should be very little extra code, and would be correct regardless of |
90 |
> > future decisions regarding EAPI. |
91 |
> > |
92 |
> > EAPI should be left as free as possible, portage just needs to notice |
93 |
> > that it doesn't recognize the value. If this would be in a |
94 |
> > not-a-number exception that would be ok too. |
95 |
> |
96 |
> Flattening the EAPI version down to 0 is wrong; re: "" existing, it |
97 |
> gets corrected by the layers that wrap the cache so it always winds up |
98 |
> as a number. |
99 |
|
100 |
Why does the cache do that. It doesn't with IUSE, DEPENDS, and most other |
101 |
variables. It should be easy to have it have the same functioning with |
102 |
EAPI. Btw. if it only maps unset or "" to 0 I have no problem with that, |
103 |
but if it maps "funky-no_number%string" to 0 or any number that would be |
104 |
broken. |
105 |
|
106 |
Paul |
107 |
|
108 |
ps. My point is that one never knows what the future holds. The EAPI |
109 |
feature is one that must be as forward compatible as possible. Designing |
110 |
forward compatibility is hard. As such the contents of EAPI should be as |
111 |
free as possible, and retrieving EAPI should be as easy as possible (by |
112 |
putting it in the start of the file). |
113 |
|
114 |
pps. For being able to state that one eclass/ebuild is compatible with two |
115 |
(overlapping) formats I also argue to make EAPI a space separated list of |
116 |
supported API's. As an example for why this would make sense take for |
117 |
example the depend.apache eclass. This eclass is compatible with both the |
118 |
proposed EAPI1 as the current EAPI0 as it does not use/provide |
119 |
src_compile. Writing separate eclasses with just different EAPI versions |
120 |
is rather pointless, so allowing a list of supported ones makes sense. I |
121 |
do realise that this makes things a bit harder as first the EAPI of an |
122 |
ebuild(including it's eclasses) must be decided, and only then might |
123 |
proper parsing be possible to happen. |
124 |
|
125 |
-- |
126 |
Paul de Vrieze |
127 |
Gentoo Developer |
128 |
Mail: pauldv@g.o |
129 |
Homepage: http://www.devrieze.net |