1 |
On Sun, Aug 30, 2009 at 07:06:02PM +0200, Mounir Lamouri wrote: |
2 |
> Hi, |
3 |
<snip> |
4 |
> However, dying is probably not the best solution too. |
5 |
> So I think we should add a new feature in PMS already used in Exherbo |
6 |
> EAPI, USE flags requirements [1]. That means an ebuild should be able to |
7 |
> say a USE flag is available only if some other ones are in a specific state. |
8 |
> Let's take the mplayer example, if we have a line like this: |
9 |
> USE_REQUIREMENTS="encode? ( mp2 mp3 faac x264 xvid )", PM should be able |
10 |
> to show the user USE="mp3" will be ignored because he didn't set |
11 |
> USE="encode" and the PM will disable this USE flag by himself. |
12 |
> The same way, for ekiga: |
13 |
> USE_REQUIREMENTS="kde? ( kontact )", PM should be able to show the user |
14 |
> if he set USE="kontact", kde USE flag is enabled and the PM will enable |
15 |
> this USE flag by himself. |
16 |
|
17 |
I'm not sure acting as if the user didn't enable the USE flag is the best |
18 |
option. If I manually enable the bar USE-flag I might not expect there to be an |
19 |
issue and not notice that it has been silently ignored. In general I think we |
20 |
should take the approach that if we can't give a user what he/she asked for we |
21 |
should error out and tell him/her that there was a problem and that |
22 |
such-and-such needs to be changed. |
23 |
|
24 |
> I'm not writing a GLEP draft so don't try to found an issue in the |
25 |
> syntax used, it's only to know if this kind of feature will be |
26 |
> appreciated by other users/devs than me and if it could be added to |
27 |
> EAPI-4 and worth to work on it. |
28 |
> I can write the GLEP and implement the feature in portage. |
29 |
|
30 |
I very much would like this feature. I've been using it in Exherbo and it's |
31 |
quite useful so far. Only thing is that it'll be possible to do this sort of |
32 |
thing(only you'll have to || die) with EAPI-3 as a 'if use foo; then use bar |
33 |
|| die "foo needs bar"'. The question is whether it is worth it to have this |
34 |
special construct for USE-flag combinations(there're far more possibilities than |
35 |
the one I gave), and I'd say it is worth it. |
36 |
> |
37 |
> [1] http://www.exherbo.org/docs/exheres-for-smarties.html#myoptions |
38 |
> |
39 |
> Thanks, |
40 |
> Mounir |
41 |
> |
42 |
|
43 |
Regards, |
44 |
Thomas |
45 |
-- |
46 |
--------- |
47 |
Thomas Anderson |
48 |
Gentoo Developer |
49 |
///////// |
50 |
Areas of responsibility: |
51 |
AMD64, Secretary to the Gentoo Council |
52 |
--------- |