Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: USE=libav as replacement for broken || ( libav:= ffmpeg:= )
Date: Wed, 21 Jan 2015 11:12:35
Message-Id: 20150121121221.2f71affb@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: USE=libav as replacement for broken || ( libav:= ffmpeg:= ) by "Michał Górny"
1 On Wed, 21 Jan 2015 11:15:04 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > Dnia 2015-01-21, o godz. 11:05:01
5 > Alexis Ballier <aballier@g.o> napisał(a):
6 >
7 > > > > > 2. Subslots work correctly. Rebuilds are forced when the
8 > > > > > chosen library is upgraded. Moreover, USE flag change causes
9 > > > > > a rebuild when user decides to change the ffmpeg provider.
10 > > > >
11 > > > > No offense, but this argument is complete crap. You should
12 > > > > rather fix portage bugs than propose to introduce tree-wide
13 > > > > changes to hide them... More precisely: || ( a:= b c:= d ) is
14 > > > > perfectly defined (in the "what it means" sense, not in PMS
15 > > > > sense). When the package is built, if 'a' is satisfied then a
16 > > > > (and its subslot) is added to the subslot list of the package;
17 > > > > ditto for c. You end up with a list of subslot deps, that you
18 > > > > can store in vdb or whatever, and use that to decide when to
19 > > > > rebuild the package.
20 > > >
21 > > > Following a specification is not a bug. I could argue here a lot
22 > > > but... just implement it. And return to us when you do. We had an
23 > > > item for this for EAPI 6, and it was removed because nobody
24 > > > volunteered to implement it. In fact, nobody even were able to
25 > > > fully specify what it should do... but if you want to discuss
26 > > > that, please start a new thread, possibly at the -pms list.
27 > >
28 > > Above is a simple algorithm that works in all cases. What you're
29 > > asking me to do is "go beg pms list to allow something they don't
30 > > want because the subslot/:= spec was poorly written and thought
31 > > of". I already gave you the solution, don't count on me for the
32 > > administrative work :=) (NB: everytime I tried to improve/fix
33 > > something in pms I failed miserably, so that I have no other choice
34 > > but giving up on this, check bgo)
35 >
36 > No, it works in the one case you thought of. Two quick issues:
37
38 Ok, so first thing: You are the one writing about putting || in
39 "effective deps" (whatever that means), for me := deps that apply when
40 the package is installed is just a list created when the package is
41 built: no ||, no use conditional, and with subslots instantiated.
42
43 > 1. What does || ( a b:= c:= ) mean? i.e. only some having subslots.
44
45 This makes sense only when in DEPEND+RDEPEND (because of the :=), so
46 apply this (mostly copy/paste) for all such deps:
47 for a in 'a' 'b' 'c':
48 When the package is built, if 'a' is satisfied and has a :=
49 dep then 'a' and its subslot is added to := deps list for the
50 installed package
51
52 As for the meaning, it uses all of a, b and c that are available at
53 buildtime and at least one of them must be present.
54 for 'b' and 'c', the := dep description/meaning from pms applies.
55
56 > 2. What does || ( a:= b:= ) mean when a and b can be both installed?
57
58 Ditto.
59
60 > Adding a very specific PMS rule for two packages doesn't sound like
61 > a very good idea to me.
62
63 I agree but I don't think it is that specific.
64
65 > > Moreover, when I bumped ffmpeg subslot, portage did rebuild all
66 > > those packages with || ( := := ) deps properly for me. So, you'll
67 > > have to be a bit more specific on what goes wrong than 'broken ||
68 > > ( libav:= ffmpeg:= )'...
69 >
70 > I already told you that before. Try switching from ffmpeg to libav,
71 > and see what mess it causes. I'll summarize it for you:
72 >
73 > 1. if you have dynamic-deps enabled, portage will want to install both
74 > ffmpeg (because of :=) and libav (because of ||). The effective
75 > deps will look like:
76 >
77 > || ( ffmpeg:0/51= libav ) ffmpeg:0/51=
78
79 with a separate := deps list, you have 'ffmpeg:0/51=' in the list; you
80 notice ffmpeg subslot has changed from '0/51' to '' (since it is not
81 installed anymore) so trigger the package for rebuild and use the ||
82 ( ffmpeg:= libav:= ) dep (which I assume works fine since that's what
83 happens when you install the package). the bug here is that portage
84 uses a crafted (r)depend string for reinstall, instead of the ones
85 from the stock ebuild from either vdb or the portage tree.
86
87 > 2. If you have dynamic-deps disabled, portage will happily switch impl
88 > without rebuilding revdeps (breakage). Afterwards, it will allow
89 > upgrading the other dep (libav) without rebuilds. The effective deps
90 > will look like:
91 >
92 > || ( ffmpeg:0/51= libav )
93
94 this is also solved by having a separate := dep list in vdb
95
96 Alexis.

Replies