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 22:05:24
Message-Id: 545E939A.1030806@gentoo.org
In Reply to: Re: [gentoo-dev] Portage dependency solving algorithm by Jauhien Piatlicki
1 On 11/08/2014 10:52 PM, Jauhien Piatlicki wrote:
2 > 08.11.14 22:47, hasufell написав(ла):
3 >> On 11/08/2014 10:30 PM, Rich Freeman wrote:
4 >>> On Sat, Nov 8, 2014 at 2:48 PM, hasufell <hasufell@g.o> wrote:
5 >>>> On 11/08/2014 08:32 PM, hasufell wrote:
6 >>>>>> Sorry to chime in like that but if you don't mind, I'd like to ask for a
7 >>>>>> real-life example for badly declared dependencies with a few words why
8 >>>>>> those are bad and how to make them actually better?
9 >>>>>>
10 >>>>>
11 >>>>> from dev-haskell/hashtables (note "hashtables" != "hashable"):
12 >>>>> || ( ( >=dev-haskell/hashable-1.1:=[profile?]
13 >>>>> <dev-haskell/hashable-1.2:=[profile?] )
14 >>>>> ( >=dev-haskell/hashable-1.2.1:=[profile?]
15 >>>>> <dev-haskell/hashable-1.3:=[profile?] )
16 >>>>> )
17 >>>>>
18 >>>>> Latest stable version of dev-haskell/hashable is 1.2.1.0.
19 >>>>> On a stable system (arch) the paludis dep-solver will try to match the
20 >>>>> first group first and realize that there is also a stable version
21 >>>>> 1.1.2.5 that matches that group. At that point there is a correct
22 >>>>> solution, but since that involves downgrading a package, it will require
23 >>>>> user-intervention, because it may not be what the user wants.
24 >>>>> (this is the easy scenario... if downgrading causes blockers, you get
25 >>>>> much more interesting output)
26 >>>>>
27 >>>>
28 >>>> To be more specific... it is assumed that hashable-1.2.1.0 is already
29 >>>> installed. Every time the dep solver runs through those packages without
30 >>>> specifying what you want, you will hit the downgrade-problem.
31 >>>
32 >>> I'm missing the problem. The package requires one of two ranges of
33 >>> hashable versions. One of them is already installed. The dependency
34 >>> is satisfied.
35 >>>
36 >>
37 >> The one that is installed (1.2.1.0) is *excluded* by the first group,
38 >> but there is a valid version that fits instead (1.1.2.5).
39 >>
40 >> That's the point where the assumptions start about what the depstring
41 >> means and what the user wants.
42 >>
43 >
44 > So the problem is only with intervals? First of all, maintainer would specify higher interval first here and it would solve a problem with possible downgrading.
45
46 I have a feeling that this is an assumption as well. PMS just says this
47 is an 'any-of' group. There is not a single word about the processing
48 order of these specs or which one to prefer, in which case some is
49 better than the other and so on.

Replies

Subject Author
Re: [gentoo-dev] Portage dependency solving algorithm Zac Medico <zmedico@g.o>