1 |
You actually pretty much completely misinterpreted what I was saying, |
2 |
so inserting the example back into the email and trying again... |
3 |
|
4 |
On Wed, Jun 11, 2008 at 12:25:55AM -0400, Mike Kelly wrote: |
5 |
> Brian Harring wrote: |
6 |
> >One thing I'll note is that the .ebuild-$EAPI approach isn't the end |
7 |
> >all fix to versioning extensions that y'all represent it as. |
8 |
> >Essentially, what .ebuild-$EAPI allows is additions to version |
9 |
> >comparison rules, no subtractions. Each new $EAPI *must* be a |
10 |
> >superset of previous $EAPIs. |
11 |
> |
12 |
> >An example would be removal of float comparison rules; for |
13 |
> ><=eapi-1, .006 < .6; Now if eapi-2 stated .006 == .6, that |
14 |
> >literally means that the PM would have to maintain versioning rules |
15 |
> >per eapi level, meaning that for an eapi1 ebuild, what it would |
16 |
> >match would differ from eapi2. Aside from that being a |
17 |
> >cluster-fuck in the implementation, it's a cluster-fuck for the dev |
18 |
> >trying to visualize what the manager is actually up to. |
19 |
> |
20 |
> Uhh... no. Just like how older package managers which don't understand |
21 |
> how to read the EAPI from a filename suffix would basically ignore the |
22 |
> new ebuilds, any package manager that can, but doesn't recognize the |
23 |
> eapi of the new one, will just ignore it. It won't ever try to figure |
24 |
> out its version or anything, it'll just do nothing. |
25 |
|
26 |
Here's the scenario: |
27 |
|
28 |
1) EAPI1 defines foo-0.006 < foo-0.6. |
29 |
2) EAPI2 redefine it so that foo-0.006 == foo-0.6 |
30 |
3) pkg 'a' has one version- '0.006' |
31 |
4) pkg b-1, EAPI=1; DEPEND='<=a-0.006' |
32 |
5) pkg c-1, EAPI=2; DEPEND='>=a-0.6' |
33 |
|
34 |
Now, via EAPI1 definition, b-1 *must* match a-0.006; via EAPI2 |
35 |
definition, b-2 *must* match a-0.006 also. The only way the manager |
36 |
can properly support this request is via getting the EAPI from the pkg |
37 |
that specified that request. |
38 |
|
39 |
Literally, the ordering of matches would have to vary dependant upon |
40 |
the eapi of the pkg. This is a serious cluster fuck for any |
41 |
implementation, and it's a pretty nice gotcha for ebuild developers. |
42 |
|
43 |
The sane alternative here is that each successive EAPI release, |
44 |
specifically the versioning rules, must be a superset of existing. |
45 |
Via that you can induce a total ordering that works regardless of the |
46 |
EAPI level of the generating pkg. |
47 |
|
48 |
A scenario that is far more entertaining is how the manager is |
49 |
supposed to handle the following: |
50 |
|
51 |
1) EAPI2 defines 1.0-scm > 1.0 |
52 |
2) pkg 'a' has one visible version; 1.0-scm |
53 |
3) pkg b-1 EAPI=1, DEPEND='<=a-1' |
54 |
4) pkg c-1 EAPI=2, DEPEND='a' |
55 |
|
56 |
What is the correct result here? Since b-1's versioning rules don't |
57 |
know a damn thing about -scm, should it even be possible for it to use |
58 |
that version? The only valid solution here (since EAPI1 does not |
59 |
know, nor specify the ordering of -scm) is to bail. |
60 |
|
61 |
If you're maintaing a total ordering (each EAPI a superset of the |
62 |
last for versioning rules), you *could* retroactively decide on that |
63 |
case. |
64 |
|
65 |
Either way, point is that .ebuild-$EAPI doesn't magically solve |
66 |
versioning changes. It hides away user visibility of it, but doesn't |
67 |
solve the real issue. |
68 |
|
69 |
|
70 |
> Also, there is absolutely no reason for all future EAPIs to be a |
71 |
> superset of old eapis. |
72 |
|
73 |
.ebuild-$EAPI-n requires all *versioning rules* to be a superset of |
74 |
$EAPI=(n-1); if in doubt, re-read my example above. |
75 |
|
76 |
Non versioning rules of $EAPI, no, no requirement to be supersets of |
77 |
proceeding- but versioning under .ebuild-$EAPI, yes, it's required. |
78 |
|
79 |
Cheers, |
80 |
~harring |