Gentoo Archives: gentoo-dev

From: Patrick Lauer <patrick@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Global USE=gui
Date: Fri, 03 Jun 2016 15:44:41
Message-Id: 067e4b66-b1d4-147c-60d5-bae03ab36809@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] Global USE=gui by "Michał Górny"
1 On 06/03/2016 10:52 AM, Michał Górny wrote:
2 > Dnia 2 czerwca 2016 21:36:10 CEST, waltdnes@××××××××.org napisał(a):
3 >>
4 >> Is it broken right now? What improvement will we see from having to
5 >> add a "GUI" flag?
6 > TL;DR: it's broken as hell, missing GUI, flag conflicts, implicit flags, full package.use and inability to sanely replace old toolkits with new ones.
7 I see it the other way around: Adding Yet Another Flag will just make
8 things more, uhm, exciting.
9
10 For example since gtk3 is totally useless on HiDPI and only mostly
11 useless on normal screens I want to actively avoid it. Having a 'gui'
12 useflag adds another indirection that badly emulates what the profile
13 already does ...
14
15 > So, let's say we're considering only GTK+ and Qt, for simplicity's sake. Wrt QA policy, we only are supposed to use the following flags: gtk2, gtk3, qt4, qt5...
16 >
17 > Now, we have the major types of packages (with some GUI):
18 >
19 > 1. Packages with a single obligatory GUI -- having no flags,
20 >
21 > 2. packages with a single optional GUI -- having one flag controlling whether it is enabled,
22 But is it gtk2 or gtk3? If 2 then I'm ok, if 3 then not, now I can't
23 easily see what is pulling in the wrong deps
24 >
25 > 3. packages with multiple GUIs -- having multiple flags.
26 >
27 > Now, the third type could be further split depending on:
28 So now dependencies become funny ...
29
30 RDEPEND="gui? ( X? ( gtk2? ( ...) gtk3? ( ...)))"
31 REQUIRED_USE="gui? ( ^^ ( gtk2 gtk3 ))"
32
33 See how gui just adds a middle layer that doesn't help most cases? Sigh. :\
34
35 [snip]
36 > Let's say he underwent the effort and enabled gtk2 on some packages, qt5 on some other.
37 >
38 > Now, when packages gain gtk3 support, he either gets new conflicts or two flags being enabled cause app to prefer one of them. When packages gain qt6 support, he is stuck with 5 until support for 5 is removed. Even though some packages start using 6 implicitly anyway.
39 Which is good / expected: If I deviate from defaults, then don't change
40 the defaults for me. If I wanted you to decide for me I'd Ubuntu all day
41 long ;)
42 >
43 >
44 > B. */* gtk3 qt5
45 >
46 > This covers packages not supporting GTK+ better but leaves multiple GTK+ problem unsolved. But now, some packages will either request him to disable one of the two, or implicitly choose one of them, possibly the one less preferred.
47 >
48 >
49 > C. */* gtk2 gtk3 qt5
50 >
51 > Because he is tired with a lot of packages not supporting GTK+3. Now, he's either in a world full of conflicts, or implicit choices. For the latter, he's unhappy that some developers make him prefer old GTK+2.
52 Implicit is usually wrong, so the packages should have an explicit
53 one-of-enabled check ... even if it's not the most aesthetical solution.
54 Otherwise, why have the useflags if you decide for the user?
55 >
56 >
57 > Of course, that are just the closest user facing problems. Additionally, every time developer refuses to use REQUIRED_USE, the user is left with some implicit choice whose result can't be predicted, possibly slow and unreadable pkg_pretend that actually tells him about the choice (too late), and multiple meaningless flag combinations that make it impossible to reuse the same binary package even though the same GUI has been actually used.
58 >
59 >
60 > I'm not saying that 'gui' solves all the problems. But it's a step in the right direction where USE flags actually start meaning something and not resembling the Ubuntu 'apt-get install libgtk+3 libfoo ...'
61
62 I kinda disagree that it solves any problems we have, and makes my life
63 more exciting. And exciting can be bad for my mood ;)