Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: Ulrich Mueller <ulm@g.o>
Cc: gentoo-dev@l.g.o, qa@g.o
Subject: Re: [gentoo-dev] Re: RFC: making repoman complain about USE dependencies that lock packages at old version
Date: Sun, 05 Apr 2015 17:40:24
Message-Id: 20150405194006.6dbc7f0d@pomiot.lan
In Reply to: [gentoo-dev] Re: RFC: making repoman complain about USE dependencies that lock packages at old version by Ulrich Mueller
1 Dnia 2015-04-05, o godz. 19:32:01
2 Ulrich Mueller <ulm@g.o> napisał(a):
3
4 > >>>>> On Sun, 5 Apr 2015, Michał Górny wrote:
5 >
6 > > This is quite a Portage patch topic but since devs are known to be
7 > > unhappy about any change, I would like to start a bikeshed first.
8 >
9 > > The idea is to make repoman/pcheck complain if the newest ebuild
10 > > matched by version+slot restriction of dependency atom can't satisfy
11 > > the USE dependency, or in other words, whenever the USE restriction
12 > > forces lower version of package being installed.
13 >
14 > > For example, let's assume the following:
15 >
16 > > a. foo-1 has USE=bar,
17 >
18 > > b. bar-1 depends on foo[bar],
19 >
20 > > c. foo-2 no longer has USE=bar.
21 >
22 > > In the usual scenario this means that bar-1 will silently lock foo
23 > > at version 1. Since this is quite implicit, users don't notice
24 > > the problem and left unnoticed for a long time, it starts to hurt
25 > > bad at some point.
26 >
27 > Is "foo[bar]" even a legal dependency, if there are versions of foo
28 > that don't have the bar flag in their IUSE? (PMS doesn't seem to be
29 > entirely clear about this: "... it is an error for a use dependency to
30 > be applied to an ebuild which does not have the flag in question in
31 > IUSE_REFERENCEABLE.")
32 >
33 > So yes, make repoman shout about it. Loudly. :)
34
35 Well, I would interpret the PMS here as: '[foo?]' restricts to foo-1
36 even with USE=-foo. Though Portage disagrees here, I guess :).
37
38 >
39 > > With the added check, after step (c) above repoman/pcheck would warn
40 > > on bar-1 that 'foo[bar]' dependency forces lower version than plain
41 > > 'foo'. Since version and slot restrictions will be taken into
42 > > consideration, it will possible to silence the warning by using:
43 >
44 > > <foo-2[bar]
45 >
46 > > explicitly, if the dependency can't be fixed for foo-2 properly.
47 > > While not improving the final result a lot, it will at least give an
48 > > explicit '<' or '=' atom that can be easily found with grep when
49 > > considering old version removal.
50 >
51 > > What are your thoughts?
52 >
53 > How are you going to treat "foo[bar(-)]" and "foo[bar(+)]"?
54
55 Well, bar(-) restricts the possible version as well, so it desires
56 a warning. As for bar(+), it's often the actual solution so no warning
57 for that.
58
59 --
60 Best regards,
61 Michał Górny