[Exherbo-dev] Proposal for "option restrictions" syntax

Bernd Steinhauser exherbo at bernd-steinhauser.de
Wed Aug 13 21:49:17 BST 2008

Ciaran McCreesh schrieb:
> On Sat, 09 Aug 2008 02:57:17 +0200
> Bernd Steinhauser <exherbo at bernd-steinhauser.de> wrote:
>> First, what are "option restrictions"?
>> Option restrictions specify a set of restrictions for the state of 
>> option flags in an exheres.
>> For example, an exheres might have option foo1 and foo2.
>> If foo1 is enabled, it needs foo2 to be enabled, too.
>> The restrictions provide a way to do this.
> What are all the possible types of restriction we need to describe? I
> can think of:
> * if a then b
> * if a then not b
> * at least one of a b c
> * exactly one of a b c
> * at most one of a b c

I don't think, that there is more. At least not more that would make sense.

Regarding the syntax, for the third case, I guess the obvious solution 
would be
|| ( a b c )
like it is done with dependencies.
The fourth case would be a selection. (For which I would propose the 
syntax foo->bar, foo->bar2 where only bar or bar2 (exclusive or) may be 
The question there is, if we want to drop selections completely and do 
it via suboptions + restrictions or if we want to keep them separate.

The fifth case is actually nested in the fourth case, because you can 
define four states instead of three states, so the selection has the 
states "none", "a", "b" and "c".
I think extending this as a special case, so that you only have to 
provide three states makes it more complicated than it has to be.


More information about the Exherbo-dev mailing list