1 |
On Thursday 11 November 2004 09:34, Mike Frysinger wrote: |
2 |
> On Wednesday 10 November 2004 07:28 pm, Thomas de Grenier de Latour wrote: |
3 |
> > Just by curiosity, what should be the behavior of a Portage |
4 |
> > implementing USE dependencies? Failure at depend time? Forcing |
5 |
> > a re-emerge of packages with missing flags? Something else? |
6 |
> |
7 |
> hasnt been decided ... |
8 |
> i think either forcing a rebuild of the package or failing and telling the |
9 |
> user what they need to do would be good |
10 |
|
11 |
I was going with rebuilding the package with the required USE flags. Two |
12 |
reasons: |
13 |
|
14 |
1) Something Mr_Bones_ said - "Emerge should do the least amount of work |
15 |
necessary to fulfill a user's request". That seems like a logical statement |
16 |
to me. I also interpret that portage should do it if it can as well. I'll go |
17 |
into the semantics of what this means in a minute. |
18 |
|
19 |
2) If we don't do it within portage, there'll be 101 faulty implementations to |
20 |
do it automagically in various clients when portage is given a public API. |
21 |
Regardless of whether it is our "fault" or not, we'll get the "blame". |
22 |
|
23 |
|
24 |
So.. semantics. Example time. :) |
25 |
|
26 |
#1 |
27 |
foo:DEPEND="baz[use]" |
28 |
baz is installed with -use |
29 |
|
30 |
"emerge foo" results in: |
31 |
baz[use] |
32 |
foo |
33 |
|
34 |
#2 |
35 |
foo:DEPEND="" |
36 |
foo:REPEND="baz[use]" |
37 |
bar:DEPEND="baz[-use]" |
38 |
bar:RDEPEND="" |
39 |
baz is installed with -use |
40 |
|
41 |
"emerge foo bar" or "emerge bar foo" results in: |
42 |
foo and baz[-use] in parallel/any order |
43 |
bar |
44 |
|
45 |
#3 |
46 |
Make DEPENDs into RDEPENDs and vice-versa in the above and.. |
47 |
|
48 |
"emerge foo bar" or "emerge bar foo" results in: |
49 |
baz[use] |
50 |
foo and baz[-use] in parallel/any order |
51 |
bar |
52 |
|
53 |
#4 |
54 |
foo:DEPEND="baz[use]" |
55 |
foo:RDEPEND="" |
56 |
bar:DEPEND="baz[-use]" |
57 |
bar:RDEPEND="" |
58 |
baz is installed with -use |
59 |
|
60 |
"emerge foo bar" or "emerge bar foo" results in: |
61 |
bar |
62 |
baz[use] |
63 |
foo |
64 |
|
65 |
#5 |
66 |
foo:RDEPEND="baz[use]" |
67 |
bar:RDEPEND="baz[-use]" |
68 |
|
69 |
"emerge foo bar" or "emerge bar foo" results in: |
70 |
NOPE!!! |
71 |
|
72 |
#6 |
73 |
foo:DEPEND="use? bar[use]" |
74 |
bar:DEPEND="use? foo[use]" |
75 |
|
76 |
"emerge foo bar" or "emerge bar foo" results in: |
77 |
bar |
78 |
foo[use] |
79 |
bar[use] |
80 |
--or-- |
81 |
foo |
82 |
bar[use] |
83 |
foo[use] |
84 |
|
85 |
|
86 |
That last case is interesting. Will probably end up using source size as a |
87 |
rough estimate of time to complete in order to determine which package comes |
88 |
first. Playing with more than two or three packages gets interesting too... |
89 |
|
90 |
Anyway, I'm sure most people don't care about this as long as it Just Works, |
91 |
so I'll leave the reasoning for going ahead with the merge at that. |
92 |
|
93 |
Regards, |
94 |
Jason Stubbs |
95 |
|
96 |
-- |
97 |
gentoo-dev@g.o mailing list |