public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE
@ 2018-01-14 23:53 Robin H. Johnson
  2018-01-15 18:34 ` Michael Orlitzky
  2018-01-18 21:43 ` [gentoo-dev] " Robin H. Johnson
  0 siblings, 2 replies; 6+ messages in thread
From: Robin H. Johnson @ 2018-01-14 23:53 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 717 bytes --]

TL;DR: add IUSE default support for MODULES_OPTIONAL_USE, off unless
variable explicitly set by ebuild.

Bug 635720 has proposed dropping this from profiles:
USE="${USE} modules"

In order to break packages less, all of the linux-mod consumers for
USE=modules need to get an IUSE default for USE=modules.

Some of them had already implemented it in the ebuild, but this patch
adds consistent support in the eclass, and the followup patch fixes all
existing consumers in the tree.

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

[-- Attachment #1.2: linux-mod-MODULES_OPTIONAL_USE_IUSE_DEFAULT.patch --]
[-- Type: text/x-diff, Size: 1427 bytes --]

diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index b3ea3e40f30f..096ded2839f4 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -22,6 +22,12 @@
 # A string containing the USE flag to use for making this eclass optional
 # The recommended non-empty value is 'modules'
 
+# @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.
+
 # @ECLASS-VARIABLE: KERNEL_DIR
 # @DESCRIPTION:
 # A string containing the directory of the target kernel sources. The default value is
@@ -129,7 +135,15 @@
 inherit eutils linux-info multilib
 EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm
 
-IUSE="kernel_linux ${MODULES_OPTIONAL_USE}"
+case ${EAPI:-0} in
+	0) die "EAPI=${EAPI} is not supported due to lack of IUSE defaults" ;;
+esac
+
+case $MODULES_OPTIONAL_USE_IUSE_DEFAULT in
+	1) _modules_optional_use_iuse_default='+' ;;
+	*) _modules_optional_use_iuse_default='' ;;
+esac
+IUSE="kernel_linux ${_modules_optional_use_iuse_default}${MODULES_OPTIONAL_USE}"
 SLOT="0"
 RDEPEND="${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} kernel_linux? ( virtual/modutils ) ${MODULES_OPTIONAL_USE:+)}"
 DEPEND="${RDEPEND}

[-- Attachment #1.3: linux-mod-MODULES_OPTIONAL_USE_IUSE_DEFAULT-consumers.patch --]
[-- Type: text/x-diff, Size: 10163 bytes --]

diff --git a/dev-util/sysdig/sysdig-0.19.1.ebuild b/dev-util/sysdig/sysdig-0.19.1.ebuild
index bd54765568c0..5eaa190d6b30 100644
--- a/dev-util/sysdig/sysdig-0.19.1.ebuild
+++ b/dev-util/sysdig/sysdig-0.19.1.ebuild
@@ -5,6 +5,7 @@ EAPI="6"
 
 : ${CMAKE_MAKEFILE_GENERATOR:=ninja}
 MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_IUSE_DEFAULT=1
 inherit linux-mod bash-completion-r1 cmake-utils
 
 DESCRIPTION="A system exploration and troubleshooting tool"
@@ -14,7 +15,7 @@ SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="libressl +modules"
+IUSE="libressl"
 
 RDEPEND="
 	app-misc/jq:0=
diff --git a/net-firewall/ipset/ipset-6.29.ebuild b/net-firewall/ipset/ipset-6.29.ebuild
index bdac66a1547a..6879f228febc 100644
--- a/net-firewall/ipset/ipset-6.29.ebuild
+++ b/net-firewall/ipset/ipset-6.29.ebuild
@@ -3,6 +3,7 @@
 
 EAPI="5"
 MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit linux-info linux-mod
 
 DESCRIPTION="IPset tool for iptables, successor to ippool"
diff --git a/net-firewall/ipset/ipset-6.30.ebuild b/net-firewall/ipset/ipset-6.30.ebuild
index 292b40eb05d7..8b53c8584eef 100644
--- a/net-firewall/ipset/ipset-6.30.ebuild
+++ b/net-firewall/ipset/ipset-6.30.ebuild
@@ -3,6 +3,7 @@
 
 EAPI="6"
 MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit linux-info linux-mod
 
 DESCRIPTION="IPset tool for iptables, successor to ippool"
diff --git a/net-firewall/ipset/ipset-6.32.ebuild b/net-firewall/ipset/ipset-6.32.ebuild
index 292b40eb05d7..8b53c8584eef 100644
--- a/net-firewall/ipset/ipset-6.32.ebuild
+++ b/net-firewall/ipset/ipset-6.32.ebuild
@@ -3,6 +3,7 @@
 
 EAPI="6"
 MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit linux-info linux-mod
 
 DESCRIPTION="IPset tool for iptables, successor to ippool"
diff --git a/net-firewall/ipset/ipset-6.34.ebuild b/net-firewall/ipset/ipset-6.34.ebuild
index 98a8e3e335b6..234c277c808c 100644
--- a/net-firewall/ipset/ipset-6.34.ebuild
+++ b/net-firewall/ipset/ipset-6.34.ebuild
@@ -3,6 +3,7 @@
 
 EAPI="6"
 MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit linux-info linux-mod
 
 DESCRIPTION="IPset tool for iptables, successor to ippool"
diff --git a/net-firewall/xtables-addons/xtables-addons-2.13.ebuild b/net-firewall/xtables-addons/xtables-addons-2.13.ebuild
index 344178cebcc0..837e51b0df9c 100644
--- a/net-firewall/xtables-addons/xtables-addons-2.13.ebuild
+++ b/net-firewall/xtables-addons/xtables-addons-2.13.ebuild
@@ -3,6 +3,8 @@
 
 EAPI="6"
 
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit eutils linux-info linux-mod multilib
 
 DESCRIPTION="iptables extensions not yet accepted in the main kernel"
@@ -12,7 +14,6 @@ SRC_URI="mirror://sourceforge/xtables-addons/${P}.tar.xz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 x86"
-IUSE="modules"
 
 MODULES="quota2 psd pknock lscan length2 ipv4options ipp2p iface gradm geoip fuzzy condition tarpit sysrq logmark ipmark echo dnetmap dhcpmac delude chaos account"
 
diff --git a/net-firewall/xtables-addons/xtables-addons-2.14.ebuild b/net-firewall/xtables-addons/xtables-addons-2.14.ebuild
index 0cc12c836299..c92942d100fd 100644
--- a/net-firewall/xtables-addons/xtables-addons-2.14.ebuild
+++ b/net-firewall/xtables-addons/xtables-addons-2.14.ebuild
@@ -3,6 +3,8 @@
 
 EAPI="6"
 
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit eutils linux-info linux-mod multilib
 
 DESCRIPTION="iptables extensions not yet accepted in the main kernel"
@@ -12,7 +14,6 @@ SRC_URI="mirror://sourceforge/xtables-addons/${P}.tar.xz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="modules"
 
 MODULES="quota2 psd pknock lscan length2 ipv4options ipp2p iface gradm geoip fuzzy condition tarpit sysrq logmark ipmark echo dnetmap dhcpmac delude chaos account"
 
diff --git a/net-misc/openvswitch/openvswitch-2.6.1.ebuild b/net-misc/openvswitch/openvswitch-2.6.1.ebuild
index 3830839ab694..0e77fb5bf1f3 100644
--- a/net-misc/openvswitch/openvswitch-2.6.1.ebuild
+++ b/net-misc/openvswitch/openvswitch-2.6.1.ebuild
@@ -4,6 +4,8 @@
 EAPI=6
 
 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 
 inherit autotools eutils linux-info linux-mod python-r1 systemd
 
@@ -14,7 +16,7 @@ SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
 LICENSE="Apache-2.0 GPL-2"
 SLOT="0"
 KEYWORDS="amd64 x86"
-IUSE="debug modules monitor +ssl"
+IUSE="debug monitor +ssl"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
diff --git a/net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild b/net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild
index 34a1a0d9f988..3ca92e9974eb 100644
--- a/net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild
+++ b/net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild
@@ -4,6 +4,8 @@
 EAPI=6
 
 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 
 inherit autotools eutils linux-info linux-mod python-r1 systemd
 
@@ -14,7 +16,7 @@ SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
 LICENSE="Apache-2.0 GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 x86"
-IUSE="debug modules monitor +ssl"
+IUSE="debug monitor +ssl"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
diff --git a/net-misc/openvswitch/openvswitch-2.7.2.ebuild b/net-misc/openvswitch/openvswitch-2.7.2.ebuild
index bfba9734edf7..6d8b8e47363a 100644
--- a/net-misc/openvswitch/openvswitch-2.7.2.ebuild
+++ b/net-misc/openvswitch/openvswitch-2.7.2.ebuild
@@ -4,6 +4,8 @@
 EAPI=6
 
 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 
 inherit autotools eutils linux-info linux-mod python-r1 systemd
 
@@ -14,7 +16,7 @@ SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
 LICENSE="Apache-2.0 GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 x86"
-IUSE="debug modules monitor +ssl"
+IUSE="debug monitor +ssl"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
diff --git a/net-misc/openvswitch/openvswitch-2.8.1.ebuild b/net-misc/openvswitch/openvswitch-2.8.1.ebuild
index 55df1bd4c281..0302edf840a3 100644
--- a/net-misc/openvswitch/openvswitch-2.8.1.ebuild
+++ b/net-misc/openvswitch/openvswitch-2.8.1.ebuild
@@ -4,6 +4,8 @@
 EAPI=6
 
 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 
 inherit autotools eutils linux-info linux-mod python-r1 systemd
 
@@ -14,7 +16,7 @@ SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
 LICENSE="Apache-2.0 GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="debug modules monitor +ssl"
+IUSE="debug monitor +ssl"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
diff --git a/net-vpn/wireguard/wireguard-0.0.20171221.ebuild b/net-vpn/wireguard/wireguard-0.0.20171221.ebuild
index fdc71975143a..177216e99fd5 100644
--- a/net-vpn/wireguard/wireguard-0.0.20171221.ebuild
+++ b/net-vpn/wireguard/wireguard-0.0.20171221.ebuild
@@ -4,6 +4,7 @@
 EAPI=6
 
 MODULES_OPTIONAL_USE="module"
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit linux-mod bash-completion-r1
 
 DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography."
@@ -21,7 +22,7 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="debug +module +tools module-src"
+IUSE="debug +tools module-src"
 
 DEPEND="tools? ( net-libs/libmnl )"
 RDEPEND="${DEPEND}"
diff --git a/net-vpn/wireguard/wireguard-9999.ebuild b/net-vpn/wireguard/wireguard-9999.ebuild
index fdc71975143a..177216e99fd5 100644
--- a/net-vpn/wireguard/wireguard-9999.ebuild
+++ b/net-vpn/wireguard/wireguard-9999.ebuild
@@ -4,6 +4,7 @@
 EAPI=6
 
 MODULES_OPTIONAL_USE="module"
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit linux-mod bash-completion-r1
 
 DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography."
@@ -21,7 +22,7 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="debug +module +tools module-src"
+IUSE="debug +tools module-src"
 
 DEPEND="tools? ( net-libs/libmnl )"
 RDEPEND="${DEPEND}"
diff --git a/sys-cluster/knem/knem-1.1.1.ebuild b/sys-cluster/knem/knem-1.1.1.ebuild
index 5de621a022fb..ce98f2660bfb 100644
--- a/sys-cluster/knem/knem-1.1.1.ebuild
+++ b/sys-cluster/knem/knem-1.1.1.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=5
 
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit autotools linux-mod linux-info toolchain-funcs udev multilib
 
 DESCRIPTION="High-Performance Intra-Node MPI Communication"
@@ -18,7 +20,7 @@ fi
 
 LICENSE="GPL-2 LGPL-2"
 SLOT="0"
-IUSE="debug modules"
+IUSE="debug"
 
 DEPEND="
 		sys-apps/hwloc
diff --git a/sys-cluster/knem/knem-9999.ebuild b/sys-cluster/knem/knem-9999.ebuild
index 5de621a022fb..ce98f2660bfb 100644
--- a/sys-cluster/knem/knem-9999.ebuild
+++ b/sys-cluster/knem/knem-9999.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=5
 
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit autotools linux-mod linux-info toolchain-funcs udev multilib
 
 DESCRIPTION="High-Performance Intra-Node MPI Communication"
@@ -18,7 +20,7 @@ fi
 
 LICENSE="GPL-2 LGPL-2"
 SLOT="0"
-IUSE="debug modules"
+IUSE="debug"
 
 DEPEND="
 		sys-apps/hwloc
diff --git a/sys-cluster/open-mx/open-mx-1.5.4.ebuild b/sys-cluster/open-mx/open-mx-1.5.4.ebuild
index ac461bfced30..7eca37c9ab99 100644
--- a/sys-cluster/open-mx/open-mx-1.5.4.ebuild
+++ b/sys-cluster/open-mx/open-mx-1.5.4.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=4
 
+MODULES_OPTIONAL_USE=modules
+MODULES_OPTIONAL_USE_DEFAULT_IUSE=1
 inherit autotools eutils linux-mod multilib toolchain-funcs udev
 
 DESCRIPTION="Open-MX - Myrinet Express over Generic Ethernet Hardware"
@@ -12,7 +14,7 @@ SRC_URI="http://gforge.inria.fr/frs/download.php/34371/${P}.tar.gz"
 LICENSE="GPL-2 LGPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="debug modules static-libs"
+IUSE="debug static-libs"
 
 DEPEND="
 		sys-apps/hwloc

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 1113 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE
  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
  2018-01-18 21:43 ` [gentoo-dev] " Robin H. Johnson
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Orlitzky @ 2018-01-15 18:34 UTC (permalink / raw
  To: gentoo-dev

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE
  2018-01-15 18:34 ` Michael Orlitzky
@ 2018-01-15 20:26   ` William Hubbs
  2018-01-15 23:47     ` Robin H. Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: William Hubbs @ 2018-01-15 20:26 UTC (permalink / raw
  To: gentoo-dev

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE
  2018-01-15 20:26   ` William Hubbs
@ 2018-01-15 23:47     ` Robin H. Johnson
  2018-01-16 17:01       ` [gentoo-dev] " Martin Vaeth
  0 siblings, 1 reply; 6+ messages in thread
From: Robin H. Johnson @ 2018-01-15 23:47 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]

On Mon, Jan 15, 2018 at 02:26:19PM -0600, William Hubbs wrote:
> 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.
I'd update the documentation rather, and explicitly state that '1' is
the only value accepted for enabling it.

> 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
That is counter-intuitive for somebody that puts
MODULES_OPTIONAL_USE_IUSE_DEFAULT=0
Or tries to otherwise have it unset.


-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 1113 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gentoo-dev] Re: [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE
  2018-01-15 23:47     ` Robin H. Johnson
@ 2018-01-16 17:01       ` Martin Vaeth
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Vaeth @ 2018-01-16 17:01 UTC (permalink / raw
  To: gentoo-dev

Robin H. Johnson <robbat2@gentoo.org> 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".



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH] linux-mod.eclass: IUSE default support for MODULES_OPTIONAL_USE
  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-18 21:43 ` Robin H. Johnson
  1 sibling, 0 replies; 6+ messages in thread
From: Robin H. Johnson @ 2018-01-18 21:43 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

On Sun, Jan 14, 2018 at 11:53:07PM +0000, Robin H. Johnson wrote:
> TL;DR: add IUSE default support for MODULES_OPTIONAL_USE, off unless
> variable explicitly set by ebuild.
> 
> Bug 635720 has proposed dropping this from profiles:
> USE="${USE} modules"
> 
> In order to break packages less, all of the linux-mod consumers for
> USE=modules need to get an IUSE default for USE=modules.
> 
> Some of them had already implemented it in the ebuild, but this patch
> adds consistent support in the eclass, and the followup patch fixes all
> existing consumers in the tree.
The eclass patch committed now, with two minor tweaks:
- accepts many values for false, everything else is true.
- If MODULES_OPTIONAL_USE is empty, ignore MODULES_OPTIONAL_USE_IUSE_DEFAULT.

Cleanups of packages to follow.

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 1113 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-18 21:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox