1 |
On Mon, 6 Jun 2016 10:53:54 -0400 |
2 |
Ian Stakenvicius <axs@g.o> wrote: |
3 |
|
4 |
> On 04/06/16 01:40 AM, Daniel Campbell wrote: |
5 |
> > On 06/03/2016 09:07 PM, Ian Stakenvicius wrote: |
6 |
> >> On 03/06/16 11:26 PM, Nick Vinson wrote: |
7 |
> >>> |
8 |
> >>> [ Snip! ] In cases where there's more than 1 option, you have to |
9 |
> >>> either introduce RESTRICTED_USE as Patrick alluded to, or decide a |
10 |
> >>> pecking order (or decide who gets to decide the pecking order). |
11 |
> >> |
12 |
> >> |
13 |
> >> Which dev's already need to do, without USE=gui -- this is not a |
14 |
> >> deviation from the status quo. |
15 |
> >> |
16 |
> >> |
17 |
> >>> |
18 |
> >>> and in that case, it *does* matter what dependencies the gui flag will |
19 |
> >>> pull in. Even if the user doesn't care, there's no reason for it to |
20 |
> >>> pull in version A when version B is also supported by the package and |
21 |
> >>> every other package with GUI support is using version B. |
22 |
> >>> |
23 |
> >> |
24 |
> >> And USE=gui is not going to eliminate said choices when there are |
25 |
> >> choices between toolkits for a package. |
26 |
> >> |
27 |
> >>> |
28 |
> >>> Some of the proposals on how to handle the case where a package supports |
29 |
> >>> more than 1 implementation (e.g. supports qt and gtk), lead me to think |
30 |
> >>> that the gui flag would inadvertently mask how a package was actually |
31 |
> >>> built and configured. In such a case, troubleshooting is potentially harder. |
32 |
> >>> |
33 |
> >>> If that can't (or won't) happen, you can disregard that paragraph. |
34 |
> >> |
35 |
> >> |
36 |
> >> That can't or won't happen. NOTHING about the USE=gui proposal turns |
37 |
> >> deterministic things into automagic things. It's just about |
38 |
> >> restructuring the determinism. |
39 |
> >> |
40 |
> >> Now, as is the case already for packages like this without a |
41 |
> >> REQUIRED_USE line, if a package supports just one of both gtk and qt5, |
42 |
> >> and both flags are enabled, then the package maintainer needs to |
43 |
> >> determine which one takes precedence and the state of the other will |
44 |
> >> be ignored. This isn't ideal since it can amount to useless rebuilds, |
45 |
> >> but it isn't automagic either. |
46 |
> >> |
47 |
> >> |
48 |
> >> |
49 |
> > You touched on the part that I'm most concerned about: choosing. If the |
50 |
> > 'GUI' USE_EXPAND gets in, do we maintainers check that variable and if |
51 |
> > there's no preference just build whatever? Will we not be expected to |
52 |
> > emit an ewarn or something similar to clarify *why* the package is being |
53 |
> > built a certain way? Granted, if a user has a problem and reports a bug, |
54 |
> > their make.conf's GUI variable should be present in emerge -v output, |
55 |
> > easily explaining the issue. |
56 |
> |
57 |
> |
58 |
> A pkg_pretend() message would certainly make sense and IMO be a good |
59 |
> idea, but again this isn't any different than the situation as it |
60 |
> stands now WITHOUT a USE=gui. Regardless I don't see this as a |
61 |
> blocker to the idea. |
62 |
|
63 |
Nope, it won't. It will only make things slower, more clumsy |
64 |
and provide no real benefit. pkg_pretend() should be reserved for |
65 |
checks really needed to build packages and not abused to do some early |
66 |
output. |
67 |
|
68 |
> > It's the implementation that gets me here, not the idea. The idea could |
69 |
> > be neat and make Gentoo management easier at the expense of some |
70 |
> > (hopefully) minor ebuild bloat. Another issue that hasn't been covered |
71 |
> > well yet is how are we going to select DEPENDs? I was told DEPEND |
72 |
> > doesn't support exactly-one-of, and we don't want extraneous dependencies. |
73 |
> |
74 |
> |
75 |
> ...you lost me on this one... You mean use-flag based operators to |
76 |
> select atoms in (R)DEPEND ? Yeah it doesn't but this isn't an issue |
77 |
> either. See below: |
78 |
> |
79 |
> |
80 |
> > Transmission is a good example: supports gtk3, qt4, qt5. Let's say the |
81 |
> > maintainer prefers the qt5 version. Would we do this?: |
82 |
> > |
83 |
> > DEPEND="gui_qt5? ( dev-qt/qtcore:5 ) gui_qt4? ( dev-qt/qtcore:4 ) |
84 |
> > gui_gtk3? ( x11-libs/gtk+:3 )" |
85 |
> > |
86 |
> > or this?: |
87 |
> > |
88 |
> > DEPEND="gui_qt5? ( !gui_qt4? ( !gui_gtk3? ( dev-qt/qtcore:5 ) ) )" |
89 |
> > |
90 |
> > (snipping because I don't feel like writing it all out) |
91 |
> |
92 |
> |
93 |
> Putting aside what seems to be a USE_EXPAND, for now, since as far as |
94 |
> I know that idea was squashed the day it was introduced on irc... |
95 |
> |
96 |
> OK, maintainer prefers the qt5 version as per your assumption, and |
97 |
> because I haven't looked, we'll assume that transmission's gui is |
98 |
> optional. RDEPEND would most likely be: |
99 |
> |
100 |
> RDEPEND="... |
101 |
> gui? ( |
102 |
> gtk3? ( x11-libs/gtk+:3 ) |
103 |
> !gtk3? ( |
104 |
> qt4? ( dev-qt/qtcore:4 ) |
105 |
> !qt4? ( dev-qt/qtcore:5 ) |
106 |
> ) |
107 |
> )" |
108 |
> |
109 |
> Note that the -default- doesn't need its own flag, since having qt5 |
110 |
> support be wrapped by a qt5 flag doesn't add anything. Note also that |
111 |
> the deps as they stand now should probably be almost identical: |
112 |
> |
113 |
> RDEPEND="... |
114 |
> qt5? ( dev-qt/qtcore:5 ) |
115 |
> !qt5? ( |
116 |
> gtk3? ( x11-libs/gtk+:3 ) |
117 |
> !gtk3? ( |
118 |
> qt4? ( dev-qt/qtcore:4 ) |
119 |
> ) |
120 |
> )" |
121 |
> |
122 |
> This -can- be simplified using a REQUIRED_USE to force just-one-of |
123 |
> gtk3,qt4,qt5 , but you can technically do the same with USE=gui too -- |
124 |
> all you'd need to do is add dependencies for the no-specific-flag case. |
125 |
> |
126 |
> RDEPEND="... |
127 |
> qt5? ( dev-qt/qtcore:5 ) |
128 |
> qt4? ( dev-qt/qtcore:4 ) |
129 |
> gtk3? ( x11-libs/gtk+:3 ) |
130 |
> gui? ( !qt5? ( !qt4? ( !gtk3? ( dev-qt/qtcore:5 ) ) )" |
131 |
> |
132 |
> And of course you could also force one of qt5/qt4/gtk3 to be enabled |
133 |
> via REQUIRED_USE if USE=gui is set, as well. |
134 |
> |
135 |
> AND, finally, as was alluded to in the original post, it could well be |
136 |
> that we don't want to bother with putting USE=gui onto packages such |
137 |
> as transmission, because when there's multiple toolkits to choose from |
138 |
> like this it just doesn't make sense. That's not really for me to |
139 |
> decide. What I want it for most is to clean up the packages that are |
140 |
> using one of these toolkit flags to just enable the gui of the one |
141 |
> toolkit it supports, as there's still plenty of those. Best practices |
142 |
> for multi-toolkit (including the possibility of no-change) can be |
143 |
> decided upon later. |
144 |
> |
145 |
> |
146 |
> Back to the code -- are there problems with any or all of these |
147 |
> options? Yes; the primary one being that flag state changes for the |
148 |
> toolkit(s) that -arent- actually being used will trigger pointless |
149 |
> rebuilds. However, this isn't actually different from anything that, |
150 |
> say, has both qt4 and qt5 in IUSE. So I don't see it as being a |
151 |
> show-stopper either. It would be nice to figure out how to avoid said |
152 |
> useless-rebuilds but that imo leads into PMS/EAPI7 territory. |
153 |
|
154 |
So many weird ideas... while the simplest one is a proper REQUIRED_USE |
155 |
with gui being the control flag, and IUSE defaults to select |
156 |
the preferred toolkit. |
157 |
|
158 |
|
159 |
-- |
160 |
Best regards, |
161 |
Michał Górny |
162 |
<http://dev.gentoo.org/~mgorny/> |