Gentoo Archives: gentoo-dev

From: hasufell <hasufell@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Portage dependency solving algorithm
Date: Sat, 08 Nov 2014 21:47:49
Message-Id: 545E8F7A.8040608@gentoo.org
In Reply to: Re: [gentoo-dev] Portage dependency solving algorithm by Rich Freeman
1 On 11/08/2014 10:30 PM, Rich Freeman wrote:
2 > On Sat, Nov 8, 2014 at 2:48 PM, hasufell <hasufell@g.o> wrote:
3 >> On 11/08/2014 08:32 PM, hasufell wrote:
4 >>> On 11/08/2014 08:01 PM, Matthias Dahl wrote:
5 >>>> Hello Ciaran...
6 >>>>
7 >>>> On 08/11/14 19:26, Ciaran McCreesh wrote:
8 >>>>
9 >>>>> No. It would make sense to introduce a cultural change, where
10 >>>>> developers stop writing dependencies that seem to work with some
11 >>>>> particular version of Portage if you don't look very closely, and start
12 >>>>> writing good dependencies.
13 >>>>
14 >>>> Sorry to chime in like that but if you don't mind, I'd like to ask for a
15 >>>> real-life example for badly declared dependencies with a few words why
16 >>>> those are bad and how to make them actually better?
17 >>>>
18 >>>
19 >>> from dev-haskell/hashtables (note "hashtables" != "hashable"):
20 >>> || ( ( >=dev-haskell/hashable-1.1:=[profile?]
21 >>> <dev-haskell/hashable-1.2:=[profile?] )
22 >>> ( >=dev-haskell/hashable-1.2.1:=[profile?]
23 >>> <dev-haskell/hashable-1.3:=[profile?] )
24 >>> )
25 >>>
26 >>> Latest stable version of dev-haskell/hashable is 1.2.1.0.
27 >>> On a stable system (arch) the paludis dep-solver will try to match the
28 >>> first group first and realize that there is also a stable version
29 >>> 1.1.2.5 that matches that group. At that point there is a correct
30 >>> solution, but since that involves downgrading a package, it will require
31 >>> user-intervention, because it may not be what the user wants.
32 >>> (this is the easy scenario... if downgrading causes blockers, you get
33 >>> much more interesting output)
34 >>>
35 >>
36 >> To be more specific... it is assumed that hashable-1.2.1.0 is already
37 >> installed. Every time the dep solver runs through those packages without
38 >> specifying what you want, you will hit the downgrade-problem.
39 >
40 > I'm missing the problem. The package requires one of two ranges of
41 > hashable versions. One of them is already installed. The dependency
42 > is satisfied.
43 >
44
45 The one that is installed (1.2.1.0) is *excluded* by the first group,
46 but there is a valid version that fits instead (1.1.2.5).
47
48 That's the point where the assumptions start about what the depstring
49 means and what the user wants.

Replies

Subject Author
Re: [gentoo-dev] Portage dependency solving algorithm Jauhien Piatlicki <jauhien@g.o>