Gentoo Archives: gentoo-dev

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Global USE=gui
Date: Fri, 03 Jun 2016 20:14:17
Message-Id: 5751E507.4090601@gmail.com
In Reply to: Re: [gentoo-dev] [RFC] Global USE=gui by waltdnes@waltdnes.org
1 On 03/06/2016 21:34, waltdnes@××××××××.org wrote:
2 > On Fri, Jun 03, 2016 at 10:35:45AM -0400, Ian Stakenvicius wrote
3 >
4 >> USE=gui is about building the graphical user interface that an
5 >> application offers, when it is optional. That's it. What
6 >> dependencies that means and so on have nothing to do with the flag.
7 >
8 > That reasoning may have been valid many years ago when qt was the only
9 > toolkit around. All GUI-optional apps back then either used qt or wrote
10 > their own primitives directly to X. Fast-forward to 2016. You now have
11 > X/Wayland/Mir/qt4/qt5/gtk2/gtk3/fltk/whatever. If a package can have a
12 > GUI from more than one of the above, you *NEED* to select implementation
13 > type *SOMEWHERE* (make.conf/package.use/profile). Deal with it.
14 >
15 >> You get that use flags are not supposed to represent dependencies
16 >> right, but features of the package??
17 >
18 > Gentoo currently assumes that users are reasonably competent, and that
19 > if they've selected specific graphics libs to be linked to a package,
20 > that they've done it for a reason; i.e. to enable a GUI.
21
22 Walter,
23
24 I think you're missing where the devs want to take this and what USE is
25 all about. It's about *features*, not about dependencies.
26
27 USE="gtk" is a dependency.
28 USE="gui" is a feature.
29 You only need enable a specific graphics lib flag when there is
30 ambiguity about what "gui" means for a package.
31
32 >
33 >> Think about a wayland system -- there's lots of packages that
34 >> IUSE="X" to build their gui implementation. If someone wanting
35 >> wayland set USE="-X" then they don't get the gui app even if it'll
36 >> work in wayland just fine.
37 >
38 > If someone wants to run a wayland system, why wouldn't they set
39 > USE="-X -mir wayland" in make.conf in the first place?!?!?
40 >
41 > Here's my problem with USE="gui"... I've set up various packages which
42 > have the gui/no-gui option. If USE="-gui" overrides USE="X gtk3 qt4 fltk",
43 > then I would have to set USE="gui" *IN ADDITION TO* telling packages
44 > which GUI toolkit to use. Since I may want some packages GUI, and some
45 > non-GUI, that would be one more USE flag to set in package.use and/or
46 > make.conf.
47 >
48 > The reason for the pushback is that this "feature" would be rammed
49 > down peoples' throats, Poettering-style. I propose a compromise
50 > solution that both sides should be happy with. It would require 2 USE
51 > flags, namely "forcegui" and "forcenogui".
52 >
53 > If "forcegui" is set, all optional-GUI apps will be built with GUIs,
54 > regardless of USE="-X -Mir -Wayland -gtk2 -gtk3 -qt4 -qt5".
55 >
56 > If "forcenogui" is set, no optional-GUI apps will be built with GUIs,
57 > regardless of USE="X Mir Wayland gtk2 gtk3 qt4 qt5".
58 >
59 > If USE="-forcegui -forcenogui" is set, things will be as they are
60 > today. GUIs will be built, or not, depending on what toolkit flags are
61 > set or not set. Gentoo is about choice.
62 >
63
64 That's a silly idea not least because it's non-deterministic. A force
65 USE flag is really just USE="gtk" or USE="qt" on a larger scale as
66 there's now *more* toolkits to randomly pick one from.
67
68 Most apps support one toolkit, often either gtk2/3 or qt4/5. It's a
69 minority that support both and we have special means to handle those.
70 For that small set of apps that do support several toolkits, what
71 exactly are you going to force? If you can have one of gtk 2 or 3 but
72 not both, which one is it? Well you'd need a USE="gtk2" or USE="gtk3" to
73 find out what the user wants.
74
75 This proposal makes things simpler and reduces flags and their usage.
76 "gui" means build the gui the thing supports.
77 "X" stops meaning "gui" or maybe "XLibs" or perhaps "usually RDP but
78 also supports magic X11" and starts to mean "X11 Window System" as
79 opposed to Wayland or Mir.
80 The other toolkit flags start to mean specific versions of toolkits and
81 only need be used when things get ambiguous and portage wants you you
82 tell it what you want.
83
84 In short, flags will get simpler (as cruft will be removed) and flags
85 gain clearer distinct names. Think of it as a code refactor after years
86 of accumulating rubbish due to no clear plan.
87
88 Alan

Replies

Subject Author
Re: [gentoo-dev] [RFC] Global USE=gui "M. J. Everitt" <m.j.everitt@×××.org>
Re: [gentoo-dev] [RFC] Global USE=gui Nick Vinson <nvinson234@×××××.com>