1 |
On Tue, Jun 7, 2016 at 3:03 PM, Brian Dolbec <dolsen@g.o> wrote: |
2 |
> |
3 |
> an ordered list of the gui toolkits in their preferred order of |
4 |
> desirability. This should be an all inclusive list. Note: these are |
5 |
> subject to package.use setting overrides. |
6 |
> |
7 |
|
8 |
This has been my thought as well. This really isn't limited to |
9 |
graphics toolkits either. It probably requires PMS support to do |
10 |
well, though maybe we could get away with an eclass of some kind (but |
11 |
messing with USE and dependencies dynamically seems problematic in an |
12 |
eclass). |
13 |
|
14 |
Let's take a USE_EXPAND-like ordered list of flags: A="a c d e" |
15 |
|
16 |
A package could support exactly one or any number of these flags. A |
17 |
package could require one or none of these flags. The package would |
18 |
somehow express whether it handles only one and whether it requires |
19 |
any. This might be done by calling a function and passing the list of |
20 |
supported flags and A. |
21 |
|
22 |
Then portage would expand this into a list of USE flags that get |
23 |
applied. If only one is supported then the effective USE flag will be |
24 |
the first flag in the list that the package supports. If it supports |
25 |
more than one then the effective flags would include all the flags the |
26 |
package supports which are in the list. If the package requires a |
27 |
flag then if in the end no flags intersected then portage will die |
28 |
with an error. |
29 |
|
30 |
From that point the flags work like ordinary USE flags - they get |
31 |
added to USE and can be used to pull in dependencies or turn on |
32 |
features. Since they've been pre-filtered down to one or many and |
33 |
requirements were dealt with you generally don't need rat-nests of |
34 |
conditionals to deal with these situations all over the place. |
35 |
|
36 |
I can still see some issues here. Maybe a package can support up to |
37 |
one qt option and up to one gtk option. Maybe the list of supported |
38 |
flags won't be "qt4 qt5 gtk2 gtk3" but rather something like " ( qt4 |
39 |
qt5 ) ( gtk2 gtk3 ) " or some other syntax that expresses the same |
40 |
sort of thing. |
41 |
|
42 |
The goal should be to make this more declarative and less procedural, |
43 |
which is the general trend here. |
44 |
|
45 |
-- |
46 |
Rich |