On Wed, Oct 19, 2011 at 03:26:21PM -0400, Mike Frysinger wrote:
> On Wednesday 19 October 2011 14:53:07 Brian Harring wrote:
> > On Wed, Oct 19, 2011 at 02:05:50PM -0400, Mike Frysinger wrote:
> > > i wrote a new func for toolchain.eclass: huse.  this is because the
> > > toolchain.eclass supports multiple versions in parallel, and the IUSE
> > > value can vary greatly between them.  so doing `use foo` without
> > > checking IUSE first doesn't work.  since i got a request to use this in
> > > other eclasses (for the same reason), i figured i'd move it to
> > > eutils.eclass so more people can benefit.
> > > 
> > > now that we have "in_iuse" in eutils.eclass (with all the caveats), i'll
> > > be
> > > 
> > > adding huse:
> > >   huse() {
> > >   
> > >           in_iuse $1 || return 1
> > >           use $1
> > >   
> > >   }
> > > 
> > > any comments before i publish ?
> > 
> > Call it safe_use.
> 
> safe for who ?  that implies to me much more vagueness than "iuse" ...

Safe in the sense it does basic IUSE checks prior, so it doesn't 
trigger QA warnings for when the ebuild doesn't support the flag.

Name's a bit off though considering if the host was amd64, `huse amd64`
would return 1 since it's not in IUSE.

Either way, the 'iuse' naming rather sucks imo; that implies the 
equivalent of `use` (is this flag in iuse?) rather than "is this flag 
in iuse and use".

If you're primarily doing this to bypass the QA warnings, than jam 
safe into the name, and/or while making sure the docs are clear about 
it.

Either way, go nuts- rather not get into a bikeshedding discussion on 
this one. ;)
~harring

Reply via email to