1 |
On Sun, 08 Mar 2009 00:08:37 -0800 |
2 |
Josh Saddler <nightmorph@g.o> wrote: |
3 |
> Is there a reason why we should ram through a new EAPI for something |
4 |
> that *looks* like another "Paludis supports this so let's make it a |
5 |
> Portage standard" proposal? Is there some kind of time deadline here |
6 |
> that you all want? |
7 |
|
8 |
If we were sticking through "things Paludis has that're useful", the |
9 |
list would be an awful lot longer... And not everything on that list is |
10 |
even in Paludis... But hey, some things never go out of fashion. |
11 |
|
12 |
A few things on the list are required pretty soon. Bug 249166 and |
13 |
various existing screwups in the tree suggest that [use(+)] (or |
14 |
whatever syntax is decided upon) is going to crop up fairly frequently. |
15 |
And certain people are reluctant to nuke their prepalldocs calls |
16 |
despite Council decisions... I think the rest are just there because |
17 |
they're useful and easy. |
18 |
|
19 |
> Also, why the bannination of || ( foo? (.).) -- how is it error prone, |
20 |
> exactly. |
21 |
|
22 |
Last time I checked, every single use of foo? as a direct child of || |
23 |
in the tree was wrong, as were the Portage docs. Let's say you have the |
24 |
following: |
25 |
|
26 |
DEPEND="|| ( |
27 |
foo? ( cat/foo ) |
28 |
bar? ( cat/bar ) |
29 |
cat/baz |
30 |
)" |
31 |
|
32 |
Then this is wrong: |
33 |
|
34 |
if use foo ; then |
35 |
myconf="--enable-foo" |
36 |
elif use bar ; then |
37 |
myconf="--enable-bar" |
38 |
else |
39 |
myconf="--enable-baz |
40 |
fi |
41 |
|
42 |
Here's why: |
43 |
|
44 |
Say the user already has baz installed, and has USE="foo". The package |
45 |
manager will see that baz is already installed, and as per the rules |
46 |
for || will not look at the foo or bar deps. So if the user doesn't |
47 |
have foo installed, the --enable-foo will be wrong. |
48 |
|
49 |
So the 'correct' code would have to be something like this: |
50 |
|
51 |
if use foo && has_version cat/foo ; then |
52 |
myconf="--enable-foo" |
53 |
elif use bar && has_version cat/bar ; then |
54 |
myconf="--enable-bar" |
55 |
else |
56 |
myconf="--enable-baz |
57 |
fi |
58 |
|
59 |
Except this is *still* a mess, because a user who has USE="foo bar" is |
60 |
going to end up with a differently configured package depending upon |
61 |
what he happens to have installed up-front, which is something that's |
62 |
not supposed to happen. |
63 |
|
64 |
-- |
65 |
Ciaran McCreesh |