Ciaran McCreesh wrote:
> Is the less expressive solution you're describing still useful enough
> to make it worthwhile? When we were doing this for Exherbo, we
> identified five types of inter-use-flag dependency:
>   
Actually, I said in my email I was looking for opinions about the
feature not really about the syntax. It was just an example but as
no-one jump to say it was useless and stupid, let's try with a clearer
syntax.

> * if a then b
>   
IUSE_REQUIREMENTS="a? ( b )"
> * if a then not b
>   
IUSE_REQUIREMENTS="a? ( -b )"
> * at least one of a b c, possibly only if d
>   
IUSE_REQUIREMENTS="d? ( || ( a b c ) )"
> * exactly one of a b c, possibly only if d
>   
IUSE_REQUIREMENTS="d? ( || ( a b c ) ) a ? ( -b -c ) b ? ( -a -c ) c? (
-a -b )"
> * at most one of a b c, possibly only if d
>   
IUSE_REQUIREMENTS="d? ( a? ( -b -c) b? ( -a -c ) c? ( -a -b) )"
if needed we can add IUSE_REQUIREMENTS="!d? ( -a -b -c)"
> Does Gentoo make use of all of these, and are there any cases that the
> above doesn't cover? How would you express each of the above using
> USE_REQUIREMENTS?
>
> From a package manager perspective, it's much easier to give good
> advice to the user if we're told by the ebuild exactly what's going on.
>   
So I think we can satisfy all use cases with the classic Gentoo syntax
even if new operators could be appreciated ;)

--
Mounir

Reply via email to