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 124A3138206 for ; Tue, 16 Jan 2018 17:03:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E871E0909; Tue, 16 Jan 2018 17:03:42 +0000 (UTC) Received: from blaine.gmane.org (unknown [195.159.176.226]) (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 17A1AE08F7 for ; Tue, 16 Jan 2018 17:03:41 +0000 (UTC) Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ebUc4-0007sa-Qc for gentoo-dev@lists.gentoo.org; Tue, 16 Jan 2018 18:01:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Martin Vaeth Subject: [gentoo-dev] Re: [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE Date: Tue, 16 Jan 2018 17:01:09 +0000 (UTC) Message-ID: References: <20180115202619.GA25005@linux1.home> X-Complaints-To: usenet@blaine.gmane.org User-Agent: slrn/1.0.2 (Linux) 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 X-Archives-Salt: 198185bd-ef61-4eea-b252-0f5be007c2f6 X-Archives-Hash: 564b63371de56bb4b9a73690d446d800 Robin H. Johnson wrote: > That is counter-intuitive for somebody that puts > MODULES_OPTIONAL_USE_IUSE_DEFAULT=0 > Or tries to otherwise have it unset. What I usually do is: case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in [nNfF]*|[oO][fF]*|0|-) # false case ;; *) # true case esac This covers most of the "intuitive" attempts (0 - Off FALSE no ...) to switch it off, and everything else (nonempty) means "on".