1 |
On Mon, 24 Dec 2007 10:52:53 +0000 |
2 |
Steve Long <slong@××××××××××××××××××.uk> wrote: |
3 |
> Ciaran McCreesh wrote: |
4 |
> > On Mon, 24 Dec 2007 06:03:12 +0000 |
5 |
> > Steve Long <slong@××××××××××××××××××.uk> wrote: |
6 |
> >> * Set the EAPI inside the ebuild in a way that makes it easy to |
7 |
> >> fetch it This is ok as atm only EAPI=1 is in the tree, so there is |
8 |
> >> no backward compatibility issue. |
9 |
> > |
10 |
> > It's both a backwards and a forwards compatibility issue. |
11 |
> > |
12 |
> Yeah, so forwards into the future where it's impossible to maintain |
13 |
> this format (er..) there'll be another type of ebuild for your |
14 |
> purported long-term solution. |
15 |
|
16 |
Hopefully that'll be EAPI 2, and hopefully we're talking months rather |
17 |
than years. |
18 |
|
19 |
> > And eclasses are an entirely separate issue. They need to |
20 |
> > be dealt with differently, ideally starting with EAPI 2. |
21 |
> > |
22 |
> But they come under the scope of this discussion, since this is about |
23 |
> the long-term future of *every* EAPI. So let's discuss them. |
24 |
|
25 |
Ok. What technically sound ideas that have been implemented in a real |
26 |
package manager and tried out on a large, real tree maintained by |
27 |
multiple developers do you have about improving eclasses with respect |
28 |
to EAPI handling? I'm curious, because the only solutions we have for |
29 |
working with the current system are going to suck in the long term (but |
30 |
equally, they do work with EAPI 0/1, which means they're fine for short |
31 |
term), and I've yet to hear of a solution that is implementable (both |
32 |
theoretically and practically), usable from a tree perspective and |
33 |
scalable across EAPIs. |
34 |
|
35 |
To start you off, here's a list of ideas that suck: |
36 |
|
37 |
* Per-EAPI eclasses, or a master eclass that uses sub-eclasses for |
38 |
whichever EAPI is in use. This is the best general current solution, but |
39 |
it gets messy very quickly with new EAPIs. |
40 |
|
41 |
* Eclasses enforcing EAPI restrictions either by global scope or |
42 |
pkg_setup die. The former's illegal, breaks the metadata cache as it's |
43 |
done currently, and is way too easy for developers to screw up. The |
44 |
latter is way too easy for developers to screw up, results in users |
45 |
seeing the mess and doesn't allow package managers to work around it. |
46 |
|
47 |
* Variant: eclasses forcibly setting EAPI to OOPS-SOMEONE-SCREWED-UP if |
48 |
they don't support the eclass used. This one's actually ok from a |
49 |
package manager perspective, but lousy from a developer testing thing |
50 |
perspective. |
51 |
|
52 |
* Eclasses modifying EAPI. Doesn't scale across multiple eclasses, nor |
53 |
across EAPIs removing features, nor EAPIs changing eclasses. |
54 |
|
55 |
* Some kind of list of supported EAPIs in an eclass. Still has to deal |
56 |
with EAPI 0 and 1, and doesn't work well across multiple eclasses. |
57 |
|
58 |
* Banning eclasses from using anything that isn't supported in every |
59 |
EAPI. Makes new features rather useless, and removing things rather |
60 |
difficult... |
61 |
|
62 |
* Crazy hackery involving making 'inherit' look somewhere else in |
63 |
future EAPIs. At best you'd end up having stub eclasses (again with no |
64 |
particularly nice way of saying 'oops') to deal with EAPIs 0 and 1. |
65 |
|
66 |
* Introduce some new global scope eclass-like function that, combined |
67 |
with supported EAPI sets, does have a proper way of signalling 'not |
68 |
supported' (and throw in per cat/pkg eclasses because you can). |
69 |
Unfortunately, you can't do this without breaking current EAPI 0 / 1 |
70 |
package managers, unless you also switch file extensions or some |
71 |
equivalent op. |
72 |
|
73 |
All but the last of these are nowhere near good enough. The last one |
74 |
may or may not be OK as a starting point, but everyone I've spoken to |
75 |
who's worked with a real multiple EAPI repo agrees that it's a long way |
76 |
off being a good enough idea that it's worth considering having serious |
77 |
discussion about it. |
78 |
|
79 |
So go ahead and start discussing eclasses, if you want. But first I |
80 |
suggest getting lots and lots of experience and making damned sure you |
81 |
understand how everything works... |
82 |
|
83 |
-- |
84 |
Ciaran McCreesh |
85 |
-- |
86 |
gentoo-dev@g.o mailing list |