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: Tue, 20 Jan 2015 08:13:56
Message-Id: 20150120091319.68bc7e04@gentoo.org
In Reply to: [gentoo-dev] RFC: USE=libav as replacement for broken || ( libav:= ffmpeg:= ) by "Michał Górny"
1 On Mon, 19 Jan 2015 20:31:45 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > Hello,
5 >
6 > As we've discussed multiple times, the following kind of dependencies
7 > is completely broken and can't work:
8 >
9 > || ( media-libs/libav:= media-libs/ffmpeg:= )
10
11 See end of the email.
12
13 > For this reason, I would like to employ the solution used by Exherbo.
14 > More specifically, use:
15 >
16 > libav? ( media-libs/libav:= )
17 > !libav? ( media-libs/ffmpeg:= )
18 >
19 > This has two advantages:
20 >
21 > 1. gives users more explicit control over whether they want to use
22 > libav or ffmpeg. Since the two have mutual blockers, right now random
23 > packages could have tried to force you to switch from one to the
24 > other. However, most often Portage would just give you terribly
25 > unreadable blockers.
26
27
28 This sounds good to me; there are a few things to consider though:
29
30 - Whatever default useflag is enabled, people will have "terribly
31 unreadable blockers" if they use the other implementation. It is even
32 worse if you want to follow upstreams in their preferred
33 implementation: some want libav, others ffmpeg...
34 - This is hidden by the proposal but it enforces that a package has
35 equal visibility of both implementations (while the || requires only
36 one); libav tends to have a faster code cleaning rate and thus a
37 slower unmasking rate in gentoo. I agree with that requirement but
38 this might end-up being unpractical since this means packages
39 keywording and stabilization will have the slowest pace: mpv has been
40 masked for 4 months and counting for this reason.
41 - What to do with packages like mplayer that haven't been building
42 against libav for a year or so ?
43 - ffmpeg dep is media-video/ffmpeg:0= (not media-libs but more
44 importantly the :0=)
45 - It is a good opportunity to kill virtual/ffmpeg and at the same time
46 workaround a subslot and := deps limitation with virtuals.
47
48
49 > 2. Subslots work correctly. Rebuilds are forced when the chosen
50 > library is upgraded. Moreover, USE flag change causes a rebuild when
51 > user decides to change the ffmpeg provider.
52
53
54 No offense, but this argument is complete crap. You should rather fix
55 portage bugs than propose to introduce tree-wide changes to hide them...
56 More precisely: || ( a:= b c:= d ) is perfectly defined (in the "what
57 it means" sense, not in PMS sense). When the package is built, if 'a' is
58 satisfied then a (and its subslot) is added to the subslot list of the
59 package; ditto for c. You end up with a list of subslot deps, that you
60 can store in vdb or whatever, and use that to decide when to rebuild
61 the package.
62
63
64 Alexis.

Replies