Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Pre-GLEP for review: mix-in profiles
Date: Mon, 23 Jan 2017 18:12:04
Message-Id: 20170123191149.59291e0e@gentoo.org
In Reply to: Re: [gentoo-dev] Pre-GLEP for review: mix-in profiles by "Paweł Hajdan
1 On Mon, 23 Jan 2017 18:17:58 +0100
2 "Paweł Hajdan, Jr." <phajdan.jr@g.o> wrote:
3
4 > On 23/01/2017 13:12, Alexis Ballier wrote:
5 > > For example, if you allow use.mask or use.force in mixins, you can
6 > > end up having unsatisfiable deps that repoman will never catch.
7 >
8 > Whoa, that sounds bad. Could you elaborate why we wouldn't be able to
9 > catch these errors?
10
11 Because repoman wont be able to check the 2^{# of mixins} possibilities
12 to have something broken there.
13
14 > > Arguably, desktop profiles relying on having an useflag forced on a
15 > > given package are already semi-broken: they'd be better with the
16 > > useflag default enabled and proper usedeps, so the mask/force game
17 > > doesnt seem really useful for mixins.
18 >
19 > Could you give examples of such assumptions? I'd agree in general
20 > usedeps sound like the proper solution.
21
22 gentoo-x86/profiles/targets/desktop/package.use.force:
23
24 # Ensure shared-mime-info is pulled in by glib, otherwise GNOME, XFCE,and
25 # numerous gtk-based applications will break, see bug #511894
26 dev-libs/glib mime
27
28 > > It'd also be great to have "rules" ensuring all mixins commute, but
29 > > I doubt that's easily doable.
30 >
31 > Could you elaborate more on that, and what the difficulties are?
32
33 First you need to define *exactly* what goes into mixins.
34
35 Then, you want that a combination of mixins doesnt depend on the order
36 they are processed. It is left to the reader to show that it is
37 equivalent to that any two mixins commute, that is, the resulting
38 profiles with the 'parent' file containing:
39 mixinA
40 mixinB
41 or:
42 mixinB
43 mixinA
44
45 are the same.
46
47 If you define mixins having only default enabled or default disabled
48 useflags (globally or per package), then commuting is implied
49 by 'no two mixins handle intersecting sets of (package,useflag)'.
50
51 One can also go the simple way: Defining a mixin priority (either
52 explicitly or by alphabetical order for example), so that e.g. in the
53 above, mixinA is always processed first.
54
55
56
57 Without doing something in that regard I think this is too loosely
58 specified and asks for headaches.
59
60 Alexis.