1 |
Doug Goldstein wrote: |
2 |
> Doug Goldstein wrote: |
3 |
> |
4 |
>> While the rule of thumb has been if an eclass needs something it should |
5 |
>> provide it's own depends. However the virtualx eclass needs to be |
6 |
>> different simply because in some cases it's only uses for tests (this is |
7 |
>> it's most common usage in the whole) tree. When it's used for tests |
8 |
>> pulling in the xorg-server the most ideal situation would be if |
9 |
>> xorg-server was only pulled in on USE=test because currently for anyone |
10 |
>> emerging an app that uses GTK+ they have a weird situation in the fact |
11 |
>> that all of GTK+'s depends that have USE=X use it to mean libX11 (as do |
12 |
>> most usages of the X USE flag), however GTK+ itself due to it's usage of |
13 |
>> the virtualx eclass pulls in xorg-server when USE=X, which is only used |
14 |
>> for tests. This results in a confusing experience for users looking to |
15 |
>> built a headless machine. |
16 |
>> |
17 |
>> It'd be a lot more consistent if ebuilds provided a USE flag or directly |
18 |
>> depended on the xorg-server and then used the functions in the eclass. |
19 |
>> So in summary, those are the changes I plan on making very shortly. If |
20 |
>> someone's got some input, please speak up. |
21 |
>> |
22 |
>> |
23 |
>> |
24 |
> Alright... after talking to Diego, Dave, and Remi the final result that |
25 |
> I've come up with is the following: |
26 |
> |
27 |
> VIRTUALX_CONDITIONAL_USE="test" |
28 |
> |
29 |
> inherit virtualx |
30 |
> |
31 |
> That'll result in virtualx adding the following: |
32 |
> |
33 |
> DEPEND="test? ( x11-base/xorg-server x11-apps/xhost )" |
34 |
> |
35 |
> if VIRTUALX_CONDITIONAL_USE is unset (as it will be for all ebuilds |
36 |
> initially) the default will be "X". Which means the default is the same |
37 |
> as what we've got today. If it's set to an empty string, it'll always be |
38 |
> required. Otherwise, it will use the supplied USE flag. |
39 |
> |
40 |
> |
41 |
Turns out this situation breaks down when multiple USE flags are |
42 |
required/used. One suggestion is to allow for that via: |
43 |
|
44 |
VIRTUALX_CONDITIONAL_USE="test X" |
45 |
|
46 |
but needs someone to write some elegant shell to make that expansion |
47 |
happen. Also, it'll happen in the global scope when the data is cached |
48 |
so a little ugh on that part. |
49 |
|
50 |
The last fall back of course is to go to just defining VIRTUALX_DEPS and |
51 |
letting each ebuild USE it how it needs to use it. |
52 |
|
53 |
Feedback, comments, etc are appreciated. |
54 |
|
55 |
-- |
56 |
Doug Goldstein |