Subject: Re: Inconsistent dependency handling
To: None <email@example.com>
From: Chapman Flack <firstname.lastname@example.org>
Date: 05/24/2006 20:24:28
Jeremy C. Reed wrote:
> But then I had a new problem: my good enough packages brought in
> dependencies that were good enough for it but not good enough for the
> package to be built.
I've had those headaches too. As implemented the system is essentially
doing a depth-first traversal of a package graph and making greedy local
decisions at each node, and the awful truth is, that's probably not TRT.
> I suggested that maybe we could pass this extra dependency requirements
> along as pkg_add options to add to the dependency requirements already
> found in the binary package to be installed. But I am not sure about
> sub-dependencies too.
I think the basic idea is right: version constraints for prerequisites
have to be accumulated from various sources, and ANDed. But it probably
can't be done in a single pass:
here the DFS, even if it propagated constraints down from parents,
might first install quux-2 without noticing that baz requires quux-3.
It seems we're really looking at a job that requires an initial
strategy pass. Whether (a) this can be expressed at all practically
within the capabilities of nbmake, or (b) nbmake can be sensibly
extended with the necessary capabilities, or (c) it should be done
by adding make targets for information gathering, that would be called
by a top-level program responsible for strategy ... is unclear to me.