1 |
On Friday 23 February 2007 06:18, Ciaran McCreesh wrote: |
2 |
> On Thu, 22 Feb 2007 22:05:56 +0100 Thomas de Grenier de Latour |
3 |
> |
4 |
> <degrenier@×××××××××××.fr> wrote: |
5 |
> | On Thu, 22 Feb 2007 19:08:48 +0000, Ciaran McCreesh |
6 |
> | |
7 |
> | <ciaranm@×××××××.org> wrote: |
8 |
> | > As has been discussed in the past, the only correct way of handling |
9 |
> | > this from an ebuild perspective is lots of use && has_version calls |
10 |
> | |
11 |
> | Which sounds like trying to mimic whatever the deps solver logic may |
12 |
> | have been, no? So, why not just let the dep solver itself give the |
13 |
> | right answer to the ebuild? It could well set a resolved DEPEND |
14 |
> | variable (lets call it $RESOLVED_DEPEND for instance) in the ebuild |
15 |
> | env, that one could query with some helper functions. |
16 |
|
17 |
This is the best solution that I could come up with in the past as well. |
18 |
|
19 |
> That strikes me as another large complication. Something that |
20 |
> complicated shouldn't be necessary. |
21 |
> |
22 |
> Also, I'd like an EAPI-0-able solution :) |
23 |
|
24 |
Disallowing it would be the cleaner in terms of package manager |
25 |
responsibilities, but ... |
26 |
|
27 |
> | > So, is there a legitimate reason for this complication to exist? Or |
28 |
> | > should use? blocks being direct children of || ( ) be forbidden? |
29 |
> | |
30 |
> | It's not clear to me what would be your prefered DEPEND syntax for the |
31 |
> | ebuild(5) example you've quoted. Something like this maybe?: |
32 |
> | sdl? ( media-libs/libsdl ) |
33 |
> | !sdl? ( |
34 |
> | svga? ( media-libs/svgalib ) |
35 |
> | !svga? ( |
36 |
> | ... |
37 |
> | |
38 |
> | (which is not really equivalent) |
39 |
> |
40 |
> Right. It's not the same, but it's a lot more logical. |
41 |
|
42 |
the above code - while likely to be what the ebuild author was originally |
43 |
intending when using the "|| ( use? () )" - is not very readable or |
44 |
maintainable. |
45 |
|
46 |
There's also one other issue that you didn't mention in your original email. |
47 |
If an ebuild has "|| ( foo? ( foo/pkg ) bar? ( bar/pkg ) )" and neither foo |
48 |
or bar are set, should it be an error because there was no successful result |
49 |
among the possibilities? While my gut feeling says "yes" and (I think) |
50 |
portage currently says "no", I can't really see any strong reason for either |
51 |
case. |
52 |
|
53 |
Disallowing use clauses directly beneath || constructs would completely |
54 |
sidestep that issue too. ;) |
55 |
|
56 |
But I still what TGL described even if only for EAPI-1 or beyond... |
57 |
|
58 |
-- |
59 |
Jason Stubbs |
60 |
-- |
61 |
gentoo-dev@g.o mailing list |