Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-15 Thread Michał Górny
On Wed, 14 Sep 2011 17:32:37 -0700 Brian Harring wrote: > On Thu, Sep 15, 2011 at 12:15:59AM +0100, Ciaran McCreesh wrote: > > On Wed, 14 Sep 2011 11:19:35 -0400 > > Mike Frysinger wrote: > > > however, why wont this work sanely in src_* or pkg_* funcs ? the > > > env there is the one construct

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-14 Thread Mike Frysinger
On Wednesday, September 14, 2011 19:15:59 Ciaran McCreesh wrote: > On Wed, 14 Sep 2011 11:19:35 -0400 Mike Frysinger wrote: > > however, why wont this work sanely in src_* or pkg_* funcs ? the env > > there is the one constructed by the PM which includes the merged IUSE > > values. > > It's not.

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-14 Thread Brian Harring
On Thu, Sep 15, 2011 at 12:15:59AM +0100, Ciaran McCreesh wrote: > On Wed, 14 Sep 2011 11:19:35 -0400 > Mike Frysinger wrote: > > however, why wont this work sanely in src_* or pkg_* funcs ? the env > > there is the one constructed by the PM which includes the merged IUSE > > values. > > It's no

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-14 Thread Ciaran McCreesh
On Wed, 14 Sep 2011 11:19:35 -0400 Mike Frysinger wrote: > however, why wont this work sanely in src_* or pkg_* funcs ? the env > there is the one constructed by the PM which includes the merged IUSE > values. It's not. We deliberately don't specify that the PM passes fixed up values for IUSE, D

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-14 Thread Mike Frysinger
On Wed, Sep 14, 2011 at 01:18, Ciaran McCreesh wrote: > On Tue, 13 Sep 2011 10:29:48 -0400 Mike Frysinger wrote: >> > You don't do it by checking IUSE. You do it by having the ebuild >> > define a variable like WANT_MONKEY_SUPPORT. >> >> it's a crap shoot.  as long as Michał's proposed func doesnt

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Ciaran McCreesh
On Tue, 13 Sep 2011 10:29:48 -0400 Mike Frysinger wrote: > > You don't do it by checking IUSE. You do it by having the ebuild > > define a variable like WANT_MONKEY_SUPPORT. > > it's a crap shoot. as long as Michał's proposed func doesnt attempt > to make guarantees that don't exist now, i think

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Mike Frysinger
On Tuesday, September 13, 2011 06:46:33 Ciaran McCreesh wrote: > On Tue, 13 Sep 2011 12:50:30 +0200 Michał Górny wrote: > > > Are you sure this is defined behaviour? IUSE is a fancy merged > > > variable for eclasses, and I don't think we guarantee that the value > > > visible to the ebuild at any

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Donnie Berkholz
On 06:39 Tue 13 Sep , Joshua Kinard wrote: > On 09/13/2011 06:29, Michał Górny wrote: > > > On Tue, 13 Sep 2011 12:21:31 +0200 > > Michał Górny wrote: > > > >> +# @FUNCTION: has_iuse > > > > Ideas for a better name will be appreciated. > > > 'in_iuse' or 'iuse_contains'? I'd prefer to ke

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Joshua Kinard
On 09/13/2011 06:46, Michał Górny wrote: > Guess just a typo but for the record: No, just a Portal joke :) -- Joshua Kinard Gentoo/MIPS ku...@gentoo.org 4096R/D25D95E3 2011-03-28 "The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment,

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Ciaran McCreesh
On Tue, 13 Sep 2011 12:50:30 +0200 Michał Górny wrote: > > Are you sure this is defined behaviour? IUSE is a fancy merged > > variable for eclasses, and I don't think we guarantee that the value > > visible to the ebuild at any particular point is the generated value > > used by the package mangle

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Michał Górny
On Tue, 13 Sep 2011 11:32:40 +0100 Ciaran McCreesh wrote: > On Tue, 13 Sep 2011 12:21:31 +0200 > Michał Górny wrote: > > Such checks are used at least in autotools-utils & kde* eclasses, > > and are done wrong there. Thus, I've created a little reusable > > snippet suitable for eutils. > > Are

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Michał Górny
On Tue, 13 Sep 2011 06:39:13 -0400 Joshua Kinard wrote: > On 09/13/2011 06:29, Michał Górny wrote: > > > On Tue, 13 Sep 2011 12:21:31 +0200 > > Michał Górny wrote: > > > >> +# @FUNCTION: has_iuse > > > > Ideas for a better name will be appreciated. > > > 'in_iuse' or 'iuse_contains'? > > i

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Joshua Kinard
On 09/13/2011 06:29, Michał Górny wrote: > On Tue, 13 Sep 2011 12:21:31 +0200 > Michał Górny wrote: > >> +# @FUNCTION: has_iuse > > Ideas for a better name will be appreciated. 'in_iuse' or 'iuse_contains'? if $(in_iuse foobar); do $(cake) fi or if $(iuse_contains foobar); do

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Ciaran McCreesh
On Tue, 13 Sep 2011 12:21:31 +0200 Michał Górny wrote: > Such checks are used at least in autotools-utils & kde* eclasses, and > are done wrong there. Thus, I've created a little reusable snippet > suitable for eutils. Are you sure this is defined behaviour? IUSE is a fancy merged variable for ec

Re: [gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Michał Górny
On Tue, 13 Sep 2011 12:21:31 +0200 Michał Górny wrote: > +# @FUNCTION: has_iuse Ideas for a better name will be appreciated. > +# @USAGE: flag Ah, this should've been ''; fixed already. -- Best regards, Michał Górny signature.asc Description: PGP signature

[gentoo-dev] [PATCH eutils] Introduce has_iuse() for IUSE checks.

2011-09-13 Thread Michał Górny
Such checks are used at least in autotools-utils & kde* eclasses, and are done wrong there. Thus, I've created a little reusable snippet suitable for eutils. --- eclass/eutils.eclass | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/eclass/eutils.eclass b/ecla