1 |
On Tuesday 25 October 2005 07:09, Donnie Berkholz wrote: |
2 |
> Ciaran McCreesh wrote: |
3 |
> | On Mon, 24 Oct 2005 21:37:03 -0700 Donnie Berkholz |
4 |
> | |
5 |
> | <spyderous@g.o> wrote: |
6 |
> | | Now, the other side of the story. It's not true runtime dependence |
7 |
> | | because it's not required for programs to run, only to compile. And |
8 |
> | | the way I see it, things required for programs to compile are by |
9 |
> | | definition DEPEND rather than RDEPEND. |
10 |
> | |
11 |
> | Not at all. If you've installed libfoo, one of the things you must be |
12 |
> | able to do is compile things that use libfoo. This sometimes means that |
13 |
> | libfoo would need a non-build-time dependency upon any libraries used |
14 |
> | by libfoo's header files. |
15 |
> |
16 |
> I disagree. You shouldn't expect to be able to compile things against it |
17 |
> unless all DEPENDs are installed. The whole point of DEPEND is to be |
18 |
> able to do things like this; remove all things not necessary for your |
19 |
> programs to run, not to compile. |
20 |
|
21 |
Perhaps, then, an additional dependency type would be useful? One that says "I |
22 |
may or may not need this for me to compile, Other programs definately need |
23 |
this to compile against me, and I don't necessarily need this to run" |
24 |
|
25 |
Let's call this CDEPEND, for the sake of example: |
26 |
package foo DEPENDs on bar, but does not CDEPEND or RDEPEND on it. bar |
27 |
CDEPENDs on baz, but does not DEPEND or RDEPEND on it. |
28 |
|
29 |
Scenario 1: |
30 |
1) emerge bar |
31 |
- bar installed |
32 |
2) emerge foo |
33 |
- baz installed |
34 |
- foo installed |
35 |
|
36 |
Scenario 2: |
37 |
1) emerge foo |
38 |
- baz installed |
39 |
- bar installed |
40 |
- foo installed |
41 |
2) "remove all compilation-only packages" |
42 |
- bar uninstalled |
43 |
- baz uninstalled |
44 |
3) emerge bar |
45 |
- bar installed |
46 |
4) emerge -u foo |
47 |
- baz installed |
48 |
- foo installed |
49 |
|
50 |
The pattern is that CDEPENDs of package fooquux are optional unless another |
51 |
package in the current dep list DEPENDs on fooquux. Only DEPEND would |
52 |
activate them, not RDEPEND or CDEPEND, so if fooquux needs a package in |
53 |
CDEPEND to compile, it must also specify it in DEPEND, and if it needs it at |
54 |
runtime, it must also specify it in RDEPEND. |