Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: USE flags in virtuals, to allow a specific provider to be determined
Date: Fri, 25 Jul 2014 21:50:31
Message-Id: 20140725225018.774fcee0@googlemail.com
In Reply to: Re: [gentoo-dev] RFC: USE flags in virtuals, to allow a specific provider to be determined by William Hubbs
1 On Fri, 25 Jul 2014 16:46:07 -0500
2 William Hubbs <williamh@g.o> wrote:
3 > On Fri, Jul 25, 2014 at 10:25:57PM +0100, Ciaran McCreesh wrote:
4 > > On Fri, 25 Jul 2014 16:23:23 -0500
5 > > William Hubbs <williamh@g.o> wrote:
6 > > > I think this could get complicated really quick though.
7 > > > For example, if I have an ebuild with three use flags,
8 > > > flag1/flag2/flag3 with the requirement that one and only one of
9 > > > them must be set, unless bash has an xor operator I don't know
10 > > > about, that is going to need a lot of nesting etc to get right.
11 > >
12 > > You don't want xor. You want addition.
13 >
14 > Can you show an example?
15
16 Well, if the use flag is on, you count it as 1, and if it's off, you
17 count it as 0. Then "need at least one" is just "the sum of these values
18 is at least 1", and "need exactly one" is "the sum of these values is
19 exactly 1".
20
21 --
22 Ciaran McCreesh

Attachments

File name MIME type
signature.asc application/pgp-signature