1 |
Piotr Jaroszyński <peper@g.o> posted |
2 |
200712172320.01988.peper@g.o, excerpted below, on Mon, 17 Dec 2007 |
3 |
23:20:01 +0100: |
4 |
|
5 |
> Let's call the EAPI included in the ebuild filename the pre-source EAPI, |
6 |
> and the EAPI set inside the ebuild the post-source EAPI. Given these |
7 |
> two, the final EAPI used by the ebuild can be established by following |
8 |
> these steps: |
9 |
> |
10 |
> * If the pre-source EAPI is not set it defaults to 0. |
11 |
> * If the pre-source EAPI is not recognised it is returned |
12 |
> immediately. |
13 |
> * If the post-source EAPI is not set, it defaults to the |
14 |
> pre-source EAPI. |
15 |
> * post-source EAPI is returned. |
16 |
> |
17 |
> The above process should be only used to generate the metadata cache. |
18 |
> Should the pre-source EAPI be unsupported the cache entry cannot be |
19 |
> generated. |
20 |
> |
21 |
> Ebuilds with unsupported EAPIs are masked. |
22 |
> |
23 |
> QA tools should consider it an error for both EAPIs to be set explicitly |
24 |
> to different values. Package managers may warn, but must use the |
25 |
> post-source EAPI in such cases. |
26 |
|
27 |
|
28 |
Up until that last quoted paragraph above, I had an entirely different |
29 |
idea of where this was headed. It's either incredibly stupid, or it's |
30 |
great outside-the-box thinking that just might be useful. Might as well |
31 |
ask or I'll never know. =8^) |
32 |
|
33 |
Put directly, what is stopping us from actually allowing DIFFERENT pre- |
34 |
source and post-source EAPI values? |
35 |
|
36 |
Here's the thinking. In the various PM discussions I've seen, it hasn't |
37 |
been unusual to see remarks about (previously) waiting for support in |
38 |
stable, and now about EAPI incompatibility, simply due to /parsing/ the |
39 |
ebuild. This could offer a way around the problem, by separating initial |
40 |
parsing/dependency EAPI and actual build/merge EAPI. The pre-source EAPI |
41 |
could state the EAPI support required to properly /source/parse/ the |
42 |
ebuild and generate the dependency tree, etc, while allowing the post- |
43 |
source EAPI to be different then allows additional flexibility in actual |
44 |
build/merge required EAPI. |
45 |
|
46 |
We'd then have two choices in terms of declaring pre-source support (as |
47 |
opposed to post-source, full merge support). |
48 |
|
49 |
1) Simply that a compatible pre-source EAPI shouldn't blow up if sourced |
50 |
while calculating dependencies or the like -- the ebuild may be safely |
51 |
sourced and it shouldn't negatively affect the dependency tree for |
52 |
unrelated packages, but dependencies for that specific package may or may |
53 |
not be correct. |
54 |
|
55 |
-OR- |
56 |
|
57 |
2) That a compatible pre-source EAPI package, when sourced, should allow |
58 |
generation of a reasonably reliable dependency tree for the package in |
59 |
question, presumably including a PM upgrade as part of that dependency |
60 |
tree. |
61 |
|
62 |
If we chose policy one, because unsupported pre-source EAPIs are |
63 |
explicitly NOT to be parsed, it would allow any arbitrary package format |
64 |
change as may eventually be found necessary, including breaking the bash- |
65 |
parsable assumption, if at some point that is found convenient. |
66 |
Conversely, supported pre-source EAPIs could at least be depended upon |
67 |
not to break the PM or dependency resolution for other branches of the |
68 |
dependency tree. As the ebuild was parsed, if a different post-source |
69 |
EAPI were found, a notice would be printed that said package couldn't be |
70 |
merged with the existing package manager, but the other branches of the |
71 |
update/merge would proceed, allowing the incompatibility for that package |
72 |
to be resolved later. |
73 |
|
74 |
If we chose policy two and pre-source and post-source EAPIs differed, |
75 |
part of the dependency tree for that package should include a PM |
76 |
supporting the post-source EAPI, in which case the other (post-source |
77 |
EAPI compatible) branches could be merged, then the required post-EAPI PM |
78 |
(presumably an upgrade, remember, this would ONLY occur if the two EAPIs |
79 |
differed so it wouldn't happen in the general case) would be merged, that |
80 |
specific package dependency tree branch recalculated post PM upgrade, and |
81 |
then that package merged. |
82 |
|
83 |
So the difference between policies for the user would be policy one would |
84 |
generally require a manual PM change intervention, while policy two could |
85 |
at least in theory (absent explicit blockers, etc) be handled entirely |
86 |
automatically. Policy two has stricter requirements for developers, |
87 |
however, and would thus be easier to break. |
88 |
|
89 |
OK, so it's off the wall, but tell me, is it useful and implementable, or |
90 |
just stupid? |
91 |
|
92 |
-- |
93 |
Duncan - List replies preferred. No HTML msgs. |
94 |
"Every nonfree program has a lord, a master -- |
95 |
and if you use the program, he is your master." Richard Stallman |
96 |
|
97 |
-- |
98 |
gentoo-dev@g.o mailing list |