Gentoo Archives: gentoo-dev

From: Paul de Vrieze <pauldv@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Portage version resolution deficiencies
Date: Tue, 23 Mar 2004 21:17:40
Message-Id: 200403232217.34159.pauldv@gentoo.org
In Reply to: Re: [gentoo-dev] Portage version resolution deficiencies by Jason Stubbs
1 On Tuesday 23 March 2004 20:01, Jason Stubbs wrote:
2 > On Wednesday 24 March 2004 00:57, Paul Smith wrote:
3 > > Hi all; I posted a message about this problem a few weeks ago. Since
4 > > then I've looked at the code and traced it through, and verified my
5 > > fears: Portage's dependency resolution method is only superficial.
6 >
7 > I must have missed your last message, but yes portage's dependency
8 > resolution is lacking. I just rewrote the dependency checker for other
9 > purposes so understand fairly well how it works, but have never looked at
10 > addressing these problems before. I previously thought that the main issue
11 > was speed but, after a quick attempt, I found that the main issue is really
12 > reverse dependencies.
13
14 This issue should be solved in portage-ng. pvdabeel is working on a dependency
15 resolution mechanism. Part of the trick is to actively build a graph of
16 candidate solutions. Then the best subgraph needs to be selected. The trick
17 is to have a lazy strategy of building the candidate solution graph so that
18 the actual graph that needs to be constructed (in memory) is not much bigger
19 than the best subgraph. One thing that is important too is to have an
20 algorithm that determines the best subgraph to work well together with the
21 lazy graph solution.
22
23 Solving the problem goes really into graph theory but together with early
24 pruning I expect the initialised nodes in the complete graph to be only about
25 10 times the number of nodes for the best subgraphs (remember that every
26 ebuild i a node, possibly even more than one (useflag deps))
27
28 Paul
29
30 ps. for useflag deps a smart splitting strategy should be used so that nodes
31 are only split on useflags when actually needed
32
33 --
34 Paul de Vrieze
35 Gentoo Developer
36 Mail: pauldv@g.o
37 Homepage: http://www.devrieze.net