On Fri, 25 Jul 2014 16:46:07 -0500 William Hubbs <willi...@gentoo.org> wrote: > On Fri, Jul 25, 2014 at 10:25:57PM +0100, Ciaran McCreesh wrote: > > On Fri, 25 Jul 2014 16:23:23 -0500 > > William Hubbs <willi...@gentoo.org> wrote: > > > I think this could get complicated really quick though. > > > For example, if I have an ebuild with three use flags, > > > flag1/flag2/flag3 with the requirement that one and only one of > > > them must be set, unless bash has an xor operator I don't know > > > about, that is going to need a lot of nesting etc to get right. > > > > You don't want xor. You want addition. > > Can you show an example?
Well, if the use flag is on, you count it as 1, and if it's off, you count it as 0. Then "need at least one" is just "the sum of these values is at least 1", and "need exactly one" is "the sum of these values is exactly 1". -- Ciaran McCreesh
signature.asc
Description: PGP signature