dev-ran...@mail.ru wrote:
> On Mon, Aug 31, 2009 at 07:27:32PM +0100, Ciaran McCreesh wrote:
>   
>> Then when the user turns on all three:
>>
>>     * If 'd' is enabled, if 'a' is enabled, 'b' must not be enabled
>>     * If 'd' is enabled, if 'a' is enabled, 'c' must not be enabled
>>     * If 'd' is enabled, if 'b' is enabled, 'a' must not be enabled
>>     * If 'd' is enabled, if 'b' is enabled, 'c' must not be enabled
>>     * If 'd' is enabled, if 'c' is enabled, 'a' must not be enabled
>>     * If 'd' is enabled, if 'c' is enabled, 'b' must not be enabled
>>
>> And in the general case, there's no way of translating the latter into
>> the former.
>>
>> Much easier for everyone if you just say what you mean rather than
>> converting it into some convoluted (but theoretically equivalent) less
>> expressive syntax.
>>     
>
> I suggest alternative syntax, less powerfull but more expressive:
> groups of use-flags.
>
> Guess we define the following flags in IUSE:
> 3d.nvidia 3d.ati 3d.intel
> or
> 3d+nvidia 3d+ati 3d+intel
> or
> 3d:nvidia 3d:ati 3d:intel
>
> In first case we may enable any number of those flags.
> In second case we must enable at least one of them.
> In third case we must enable exactly one of them.
> In all 3 cases, if (and only if) flag '3d' itself exist in IUSE,
> those flags are ignored when it is unset.
>
> For convenience, user may use '.' as middle-character in config in
> all 3 cases (or, perhaps, even omit it and everything before it),
> but in output of PM he will see proper character and understand
> dependencies between flags without any explanation in English.
>
> If we add flag which depends on nvidia (e.g. cg), we name it
> 3d.nvidia.cg, and it will be ignored (perhaps with warning) if flag
> 3d.nvidia is unset
As you said, it's not enough powerful. It's going to be hard if foo
flags depends on 3d and bar.
In addition, I don't think the real issues is the friendliness of the
syntax but the powerful aspect. Indeed, it shouldn't be shown to the
user and more the syntax is powerful less the user will be annoyed.

--
Mounir

Reply via email to