REQUIRED_USE
REQUIRED_USE should be implemented, hopefully with as much expressiveness as Portage's implementation. The first two are not actually included in portage, as use flags are supposed to be for options only, however (Didn't appear in the handbook, but are both implemented and in the spec) there are situations where it would be useful to declare a package as being incompatible with a certain use flag. A good example of this is nudity, where if a mod does not have a non-nude version you should be able to require that the nudity use flag is set to be able to install it (which can be overridden with a mod specific flag if the user wants), but that way you won't accidentally install a mod with nudity unless you have actually set the flag.
Behaviour | Expression |
---|---|
flag must be enabled | flag |
flag must not be enabled | !flag |
If flag1 enabled then flag2 enabled | flag1? ( flag2 ) |
If flag1 disabled then flag2 enabled | !flag1? ( flag2 ) |
If flag1 disabled then flag2 disabled | !flag1? ( !flag2 ) |
Must enable any one or more (inclusive or) | || ( flag1 flag2 flag3 ) |
Must enable exactly one but not more (exclusive or) | ^^ ( flag1 flag2 flag3 ) |
May enable at most one | ?? ( flag1 flag2 flag3 ) |
-
flag
-
!flag
-
flag1? ( flag2 )
-
!flag1? ( flag2 )
-
!flag1? ( !flag2 )
-
|| ( flag1 flag2 flag3 )
-
^^ ( flag1 flag2 flag3 )
-
?? ( flag1 flag2 flag3 )
Edited by Benjamin Winger