Gentoo Archives: gentoo-dev

From: Alec Warner <antarus@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>, gentoo-dev-portage@g.o
Subject: Re: [gentoo-dev] NEWS item for games destabling
Date: Mon, 27 Nov 2017 20:55:33
Message-Id: CAAr7Pr-qi-rW7JR9JWLsgU-EHxv=7Qf-Eq9Xm2Gap=Z=p_GV5g@mail.gmail.com
In Reply to: Re: [gentoo-dev] NEWS item for games destabling by Michael Orlitzky
1 On Mon, Nov 27, 2017 at 3:44 PM, Michael Orlitzky <mjo@g.o> wrote:
2
3 > On 11/27/2017 03:37 PM, Arve Barsnes wrote:
4 > >
5 > > Sounds kind of weird? If he has keyworded the game package, shouldn't it
6 > > just never install that version if it depends on an unstable package?
7 >
8 > That's right, but if there are two available ~arch versions, one of
9 > which has all stable dependencies and (the newer) one of which has all
10 > ~arch dependencies, then portage will try to install the newer one and
11 > tell you to keyword a million things -- even though it could install the
12 > first one with less hassle.
13 >
14 >
15 In theory the resolver could support such a scheme, no?
16
17 Currently it prefers "best_visible" where best == "highest version"
18
19 But other predicates might be possible like "tightest_visible"
20
21 Note that currently best_visible is fairly straightforward to implement:
22
23 visible = find_all_visible()
24 best_visible = max(visible) # simple ver_cmp
25
26 tightest_visible:
27 visible = find_all_visible()
28 tightest_visible = min(visible, key=cpv.tightness)
29
30 # A weird predicate where 'tightness' implies dependencies are already
31 visible? I can't think of a better term.
32 def tightness(self):
33 return len([atom for atom in self.dependencies if atom.is_visible()])
34
35 So "tighter" packages have dependencies that are visible / installed.
36 "Loose" packages have unmet dependencies or dependencies that are not
37 currently visible.
38
39 I have not messed with the portage resolver in some time; in theory given
40 perfect code you just plum this in once....
41 but I'm skeptical its that easy (and I suspect best_visible is in fact
42 'presumed' in many places.
43
44 But Zac would probably know best.
45
46 -A
47
48
49
50 > For example, if you're on a system with no ruby packages, then it's the
51 > difference between having to keyword 10 packages for rails-x.y.z versus
52 > 200 packages for rails-x.y.(z+1). I'd rather have the slightly older
53 > version that requires less configuration.
54 >
55 >
56 >