Gentoo Archives: gentoo-dev

From: Mounir Lamouri <volkmar@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] USE flags requirements (EAPI-4 ?)
Date: Mon, 31 Aug 2009 13:06:49
Message-Id: 4A9C1349.9060208@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] USE flags requirements (EAPI-4 ?) by Ciaran McCreesh
1 Ciaran McCreesh wrote:
2 > Is the less expressive solution you're describing still useful enough
3 > to make it worthwhile? When we were doing this for Exherbo, we
4 > identified five types of inter-use-flag dependency:
5 >
6 Actually, I said in my email I was looking for opinions about the
7 feature not really about the syntax. It was just an example but as
8 no-one jump to say it was useless and stupid, let's try with a clearer
9 syntax.
10
11 > * if a then b
12 >
13 IUSE_REQUIREMENTS="a? ( b )"
14 > * if a then not b
15 >
16 IUSE_REQUIREMENTS="a? ( -b )"
17 > * at least one of a b c, possibly only if d
18 >
19 IUSE_REQUIREMENTS="d? ( || ( a b c ) )"
20 > * exactly one of a b c, possibly only if d
21 >
22 IUSE_REQUIREMENTS="d? ( || ( a b c ) ) a ? ( -b -c ) b ? ( -a -c ) c? (
23 -a -b )"
24 > * at most one of a b c, possibly only if d
25 >
26 IUSE_REQUIREMENTS="d? ( a? ( -b -c) b? ( -a -c ) c? ( -a -b) )"
27 if needed we can add IUSE_REQUIREMENTS="!d? ( -a -b -c)"
28 > Does Gentoo make use of all of these, and are there any cases that the
29 > above doesn't cover? How would you express each of the above using
30 > USE_REQUIREMENTS?
31 >
32 > From a package manager perspective, it's much easier to give good
33 > advice to the user if we're told by the ebuild exactly what's going on.
34 >
35 So I think we can satisfy all use cases with the classic Gentoo syntax
36 even if new operators could be appreciated ;)
37
38 --
39 Mounir

Replies

Subject Author
Re: [gentoo-dev] [RFC] USE flags requirements (EAPI-4 ?) Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>