Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: ferringb@×××××.com
Subject: Re: [gentoo-dev] huse: new helper for low level eclass writers
Date: Wed, 19 Oct 2011 19:51:37
Message-Id: 20111019215059.2fa2ce59@pomiocik.lan
In Reply to: Re: [gentoo-dev] huse: new helper for low level eclass writers by Brian Harring
1 On Wed, 19 Oct 2011 11:53:07 -0700
2 Brian Harring <ferringb@×××××.com> wrote:
3
4 > On Wed, Oct 19, 2011 at 02:05:50PM -0400, Mike Frysinger wrote:
5 > > i wrote a new func for toolchain.eclass: huse. this is because the
6 > > toolchain.eclass supports multiple versions in parallel, and the
7 > > IUSE value can vary greatly between them. so doing `use foo`
8 > > without checking IUSE first doesn't work. since i got a request to
9 > > use this in other eclasses (for the same reason), i figured i'd
10 > > move it to eutils.eclass so more people can benefit.
11 > >
12 > > now that we have "in_iuse" in eutils.eclass (with all the caveats),
13 > > i'll be adding huse:
14 > > huse() {
15 > > in_iuse $1 || return 1
16 > > use $1
17 > > }
18 > >
19 > > any comments before i publish ?
20 >
21 > Call it safe_use.
22
23 Maybe something off 'default' instead? It could be made a little like
24 USE defaults, falling back to the default value when USE isn't declared.
25
26 --
27 Best regards,
28 Michał Górny

Attachments

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