Gentoo Archives: gentoo-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Portage version resolution deficiencies
Date: Tue, 23 Mar 2004 19:02:48
Message-Id: 200403240401.18626.jstubbs@gentoo.org
In Reply to: [gentoo-dev] Portage version resolution deficiencies by Paul Smith
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On Wednesday 24 March 2004 00:57, Paul Smith wrote:
5 > Hi all; I posted a message about this problem a few weeks ago. Since
6 > then I've looked at the code and traced it through, and verified my
7 > fears: Portage's dependency resolution method is only superficial.
8
9 I must have missed your last message, but yes portage's dependency resolution
10 is lacking. I just rewrote the dependency checker for other purposes so
11 understand fairly well how it works, but have never looked at addressing
12 these problems before. I previously thought that the main issue was speed
13 but, after a quick attempt, I found that the main issue is really reverse
14 dependencies.
15
16 > Consider this situation:
17 > cat/all/all-1.ebuild: DEPEND=" ~cat/first-1 ~cat/second-1 "
18 > cat/first/first-1.ebuild DEPEND=" cat/second "
19 > cat/second/second-1.ebuild DEPEND=""
20 > cat/second/second-2.ebuild DEPEND=""
21
22 Bug #45493 has a real-world example. Well, almost...
23
24 > The first thing that may happen is the merge will go like this:
25 > cat/second-2
26 > cat/first-1
27 > cat/second-1
28 > cat/all-1
29
30 I haven't attempted addressing this yet.
31
32 > The second thing that may happen is this:
33 > cat/second-1
34 > cat/second-2
35 > cat/first-1
36 > cat/all-1
37
38 This I got working successfully, albeit a 1000% increase in run-time. I then
39 tried doing a deep world update and got reverse dependencies galore. To
40 counter this, I modified it to not worry about the order of dependencies if
41 already installed packages can satisfy them.
42
43 Now, I haven't managed to break that yet BUT... what happens if a user hasn't
44 updated for an extended period of time? Say, 10 months. After this time, gcc
45 and glibc both require versions of each other that are later than the user
46 has installed. My hack would then break. A perfect dep-checker would find
47 that the correct path is gcc-intermediate, glibc-latest, gcc-latest. See how
48 complicated it's getting?
49
50 The plan is to have several dependency checkers, each being a compromise
51 between speed and intelligence. A few things need to be addressed before this
52 can happen, but you'll be glad to know that progress is being made.
53
54 Regards,
55 Jason Stubbs
56 -----BEGIN PGP SIGNATURE-----
57 Version: GnuPG v1.2.4 (GNU/Linux)
58
59 iQCVAwUBQGCJfVoikN4/5jfsAQJmugQAuhO4vQJbTWD7E7R2mkikq5y9QvJ0qIus
60 TF4NSAxCXNKoMrutsMfZQhffu0/+gYFFYlnpzyIhfPbLfn6nnmGUmE/4STBFzLuy
61 vuSWQ68d7Sc6dqWlTyr4UIhyM47D3v9+ojRcKzHv7CxULoMzl7rX/YMykQkcAIso
62 bbquD2Mof+w=
63 =uQ5M
64 -----END PGP SIGNATURE-----
65
66 --
67 gentoo-dev@g.o mailing list

Replies