From: William Hubbs <williamh@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE
Date: Mon, 15 Jan 2018 14:26:19 -0600 [thread overview]
Message-ID: <20180115202619.GA25005@linux1.home> (raw)
In-Reply-To: <cc57c14d-e4c3-df4d-3ff7-85bef077744d@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
On Mon, Jan 15, 2018 at 01:34:12PM -0500, Michael Orlitzky wrote:
> On 01/14/2018 06:53 PM, Robin H. Johnson wrote:
> > +# @ECLASS-VARIABLE: MODULES_OPTIONAL_USE_IUSE_DEFAULT
> > +# @DESCRIPTION:
> > +# A boolean to control the IUSE default state for the MODULES_OPTIONAL_USE USE
> > +# flag. Default value is unset (false). True represented by 1 or 'on', other
> > +# values including unset treated as false.
> > +
> > ...
> > +
> > +case $MODULES_OPTIONAL_USE_IUSE_DEFAULT in
> > + 1) _modules_optional_use_iuse_default='+' ;;
> > + *) _modules_optional_use_iuse_default='' ;;
> > +esac
>
> I missed this the first time around, but the case statement needs to
> catch "on", too.
and possibly all other case combinations of on, so On oN ON also have to
be caught,
And since you define it as a boolean, you also need to worry about all
combinations of true.
Honestly what I would do is kill the case completely and use something
like this:
+if [ -n "${MODULES_OPTIONAL_USE_IUSE_DEFAULT}" ]; then
+ _modules_optional_use_iuse_default='+'
+fi
William
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2018-01-15 20:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-14 23:53 [gentoo-dev] [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE Robin H. Johnson
2018-01-15 18:34 ` Michael Orlitzky
2018-01-15 20:26 ` William Hubbs [this message]
2018-01-15 23:47 ` Robin H. Johnson
2018-01-16 17:01 ` [gentoo-dev] " Martin Vaeth
2018-01-18 21:43 ` [gentoo-dev] " Robin H. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180115202619.GA25005@linux1.home \
--to=williamh@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox