From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4B84C138206 for ; Mon, 15 Jan 2018 20:26:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB109E0891; Mon, 15 Jan 2018 20:26:23 +0000 (UTC) Received: from mail-oi0-x243.google.com (mail-oi0-x243.google.com [IPv6:2607:f8b0:4003:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 972A0E086B for ; Mon, 15 Jan 2018 20:26:23 +0000 (UTC) Received: by mail-oi0-x243.google.com with SMTP id t16so9090828oif.10 for ; Mon, 15 Jan 2018 12:26:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SLKq8GIqJXJkfeHNkUniKWuBfRjYvuXoSEas1z5ZD8g=; b=ERcwm91I08/VsKoDG8rQ0dbgh0UvIx9353YNhDeRUAfzCvm2ihbyYckM5y0kMk+ytQ IvaoVG6k15GSBlxFZQdMQpNZyJ1mj5bNLz/Iftwe4BrHTWFnmzQMc+pW/Nr41g8vUSDZ tRVqHU2XsXXbgPshTCWAogHg0BaYDs7sR6io6TxobUI8MsB3MhpccrMIVcvc45NMT2P/ OFv+R20Abs5s2n8AoXo/DOK338HRjTAqWmfM1OpfYrpdnmtwm+oVkzvP8BNWt+CaEY4Q 5XoBEUXDNYqH43RVjVIktxrbCmKiIIu8jpb4pXMhHdyc/Mb4NNUKfve0QsbLNniEDmXd e3aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=SLKq8GIqJXJkfeHNkUniKWuBfRjYvuXoSEas1z5ZD8g=; b=qu4cLoRdptpWc5LFh8aVIUewE7eqS/hUQFC6bmqdYwLPMl+z0Fv1dbkAIWOqlmCFPL Vb2rYWe+npSlyQD71jH4LwpLfO97JZxbZc0dNzPQKRr36QEu1fo0KUi9FXu7APIzAOeo WjPTmkg3iE4RU24rur+wm5Usi7hLiSGc1k+4vJ2UGNt3WJqVwUNESuaAv0ZLROuFjWx3 xBeibBMI+vcevJBEGkV/btocF461xJ+5zDOluSkFL29f9+T9pkm74ZgXF8wLiGZewYy9 n3AKQcezqaZAgYZiVcDhlY4WVMzxwGTXM//WleYEAj64EX/3JrBnv1595svgY55glhy0 f4FQ== X-Gm-Message-State: AKwxytcaFyhuzmn1v+GWrUG3lmv9JrnjpOUE8CJZQqNoFFIBLd4pxktb 9/bikKdIYKXnIhpqsx40qOBz9A== X-Google-Smtp-Source: ACJfBotDlN+HsEC9nk0cHCLHlXugoa4XNbhL3z14DIdb89QQz7AuLy3MDOFOepsLhXe6eYC9x9C7oA== X-Received: by 10.202.8.1 with SMTP id 1mr3220055oii.265.1516047982347; Mon, 15 Jan 2018 12:26:22 -0800 (PST) Received: from linux1 (cpe-66-68-34-247.austin.res.rr.com. [66.68.34.247]) by smtp.gmail.com with ESMTPSA id g97sm219540otg.65.2018.01.15.12.26.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Jan 2018 12:26:20 -0800 (PST) Sender: William Hubbs Received: (nullmailer pid 25053 invoked by uid 1000); Mon, 15 Jan 2018 20:26:19 -0000 Date: Mon, 15 Jan 2018 14:26:19 -0600 From: William Hubbs To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE Message-ID: <20180115202619.GA25005@linux1.home> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Archives-Salt: cf506190-2291-4cf4-8911-12c40dcba445 X-Archives-Hash: b8708b41ac7f528ccc1a13807ba89ddf --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3D'+' ;; > > + *) _modules_optional_use_iuse_default=3D'' ;; > > +esac >=20 > 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=3D'+' +fi William --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTVeuxEZo4uUHOkQAluVBb0MMRlOAUCWl0OYwAKCRBuVBb0MMRl ONAuAKC57ARngjrbJGvNgW7Mc3hWNvXZOwCfYb2DwR/j16PEZWw2poq2L+KOR7k= =mca1 -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--