1 |
Am Donnerstag, den 09.04.2009, 05:25 +0300 schrieb Mart Raudsepp: |
2 |
> Hello, |
3 |
> |
4 |
> |
5 |
> This thread is for any discussion about the slot operator support item |
6 |
> in EAPI-3 draft. |
7 |
> |
8 |
> The premise is good what := and :* allow for, but I'm concerned about |
9 |
> the syntax possibly ending up being suboptimal in relation to the syntax |
10 |
> we come up in the future for covering the cases not covered now. |
11 |
> |
12 |
> |
13 |
> Such cases are for example: |
14 |
> |
15 |
> * A library package has slots 2.4, 2.6 and 2.8. An application works |
16 |
> with either 2.6 or 2.8, but needs a recompile for changed ABI. It does |
17 |
> not work with 2.4 - it has API missing that it needs. |
18 |
DEPEND=RDEPEND=">=cat/lib-2.6:=" |
19 |
|
20 |
> * Same case as previous, but additionally the library has a version with |
21 |
> slot 3.0 - it is a complete redesign and applications working with 2.8 |
22 |
> have no chance of working. So need to express a list of acceptable SLOTs |
23 |
> or a minimum and maximum (but slots aren't really guaranteed to be |
24 |
> numeric and versionable). |
25 |
slot operators won't help here, so it remains: |
26 |
RDEPEND="|| ( cat/lib:2.6 cat/lib:2.8 )" |
27 |
|
28 |
with ranged dependencies: |
29 |
RDEPEND="cat/lib[>=2.6&<3]:=" |
30 |
|
31 |
or slot ranges: |
32 |
RDEPEND="cat/lib:[2.6|2.8]=" |
33 |
or |
34 |
RDEPEND="cat/lib:=[2.6|2.8]" |
35 |
(depends on how we want to define the syntax) |
36 |
|
37 |
> * Same case as previous (either of them), but if using SLOT 2.6, it |
38 |
> needs to be at least >=libr/ary-2.6.5:2.6 and if SLOT 2.8 at least |
39 |
> >=libr/ary-2.8.3:2.8. A re-compile if switching provider may or may not |
40 |
> be necessary (considering both cases separately) |
41 |
slot operators won't help here, so it remains: |
42 |
RDEPEND="|| ( >=cat/lib-2.8.3:2.8 >=cat/lib-2.6.5:2.6 )" |
43 |
|
44 |
again with ranged dependencies (somebody please check this): |
45 |
RDEPEND="cat/lib[<3.0&(>=2.8.3|>=2.6.5)]:=" |
46 |
or |
47 |
RDEPEND="cat/lib[<3.0&(>=2.8.3|>=2.6.5)]:*" |
48 |
|
49 |
or maybe combined with slot ranges: |
50 |
RDEPEND="cat/lib[>=2.8.3|>=2.6.5]:=[2.8|2.6] |
51 |
|
52 |
please note: the ebuild maintainer has to make sure that the package has |
53 |
to use the best-matching version, otherwise even the slot specifiers are |
54 |
worthless. |
55 |
|
56 |
Real-world example for that: |
57 |
DEPEND="sys-libs/db:=" |
58 |
RDEPEND="${RDEPEND}" |
59 |
|
60 |
By the time of installation you have sys-libs/db:{4.6,4.7} installed, |
61 |
then your app has to use sys-libs/db:4.7. |
62 |
(best_version should provide that information as far as I know). |
63 |
|
64 |
> |
65 |
> * A library provides slots 1.2, 1.4 and 1.6. An application can work |
66 |
> with all of them, but needs a recompile if upgrading from being linked |
67 |
> against 1.2 to newer. 1.4 and 1.6 are runtime interchangeable. Very rare |
68 |
> possibility of this though, involving dlopen and more. Probably |
69 |
> acceptable to declare rebuild need for all changes. |
70 |
Yes. |
71 |
|
72 |
> Are we sure := and :* is the syntax that makes sense once we try to |
73 |
> cover some of the above with new syntax? |
74 |
Yes. It's quiet extendable (as seen above). |
75 |
|
76 |
> |
77 |
> Perhaps some forward thinking is sensible here to not end up with having |
78 |
> to deprecate the := and :* syntax soon after its introduction. |
79 |
Done. |