Gentoo Archives: gentoo-dev

From: John Myers <electronerd@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Reminder on dependencies.
Date: Tue, 25 Oct 2005 16:05:14
Message-Id: 200510250903.28250.electronerd@monolith3d.com
In Reply to: Re: [gentoo-dev] Reminder on dependencies. by Donnie Berkholz
On Tuesday 25 October 2005 07:09, Donnie Berkholz wrote:
> Ciaran McCreesh wrote: > | On Mon, 24 Oct 2005 21:37:03 -0700 Donnie Berkholz > | > | <spyderous@g.o> wrote: > | | Now, the other side of the story. It's not true runtime dependence > | | because it's not required for programs to run, only to compile. And > | | the way I see it, things required for programs to compile are by > | | definition DEPEND rather than RDEPEND. > | > | Not at all. If you've installed libfoo, one of the things you must be > | able to do is compile things that use libfoo. This sometimes means that > | libfoo would need a non-build-time dependency upon any libraries used > | by libfoo's header files. > > I disagree. You shouldn't expect to be able to compile things against it > unless all DEPENDs are installed. The whole point of DEPEND is to be > able to do things like this; remove all things not necessary for your > programs to run, not to compile.
Perhaps, then, an additional dependency type would be useful? One that says "I may or may not need this for me to compile, Other programs definately need this to compile against me, and I don't necessarily need this to run" Let's call this CDEPEND, for the sake of example: package foo DEPENDs on bar, but does not CDEPEND or RDEPEND on it. bar CDEPENDs on baz, but does not DEPEND or RDEPEND on it. Scenario 1: 1) emerge bar - bar installed 2) emerge foo - baz installed - foo installed Scenario 2: 1) emerge foo - baz installed - bar installed - foo installed 2) "remove all compilation-only packages" - bar uninstalled - baz uninstalled 3) emerge bar - bar installed 4) emerge -u foo - baz installed - foo installed The pattern is that CDEPENDs of package fooquux are optional unless another package in the current dep list DEPENDs on fooquux. Only DEPEND would activate them, not RDEPEND or CDEPEND, so if fooquux needs a package in CDEPEND to compile, it must also specify it in DEPEND, and if it needs it at runtime, it must also specify it in RDEPEND.