commit:     f6088d565d3e3aff0da992aec1ddaca3934b0e14
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 00:36:04 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jan  7 12:39:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6088d56

linux-mod.eclass: Add a prebuilt-kernel rebuild flag

Add a 'prebuilt-kernel' USE flag that controls a bound-slot dependency
on virtual/prebuilt-kernel.  If the flag is enabled, it should ensure
that the module will be rebuilt automatically on future kernel upgrades.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/linux-mod.eclass                          | 13 ++++++++++---
 profiles/arch/amd64/use.mask                     |  6 +++++-
 profiles/arch/amd64/use.stable.mask              |  6 +++++-
 profiles/arch/arm/use.mask                       |  6 +++++-
 profiles/arch/arm/use.stable.mask                |  6 +++++-
 profiles/arch/arm64/use.mask                     |  6 +++++-
 profiles/arch/arm64/use.stable.mask              |  6 +++++-
 profiles/arch/base/use.mask                      |  6 +++++-
 profiles/arch/powerpc/ppc64/64le/use.mask        |  6 +++++-
 profiles/arch/powerpc/ppc64/64le/use.stable.mask |  6 +++++-
 profiles/arch/x86/use.mask                       |  6 +++++-
 profiles/arch/x86/use.stable.mask                |  6 +++++-
 profiles/use.desc                                |  3 ++-
 13 files changed, 67 insertions(+), 15 deletions(-)

diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index f5a5a427636..e0444eacc61 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: linux-mod.eclass
@@ -144,9 +144,16 @@ esac
        0) die "EAPI=${EAPI} is not supported with 
MODULES_OPTIONAL_USE_IUSE_DEFAULT due to lack of IUSE defaults" ;;
 esac
 
-IUSE="kernel_linux 
${MODULES_OPTIONAL_USE:+${_modules_optional_use_iuse_default}}${MODULES_OPTIONAL_USE}"
+IUSE="kernel_linux dist-kernel
+       
${MODULES_OPTIONAL_USE:+${_modules_optional_use_iuse_default}}${MODULES_OPTIONAL_USE}"
 SLOT="0"
-RDEPEND="${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} kernel_linux? ( 
sys-apps/kmod[tools] ) ${MODULES_OPTIONAL_USE:+)}"
+RDEPEND="
+       ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (}
+               kernel_linux? (
+                       sys-apps/kmod[tools]
+                       dist-kernel? ( virtual/dist-kernel:= )
+               )
+       ${MODULES_OPTIONAL_USE:+)}"
 DEPEND="${RDEPEND}
     ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (}
        sys-apps/sed

diff --git a/profiles/arch/amd64/use.mask b/profiles/arch/amd64/use.mask
index 2334ab31938..30c8a9b4114 100644
--- a/profiles/arch/amd64/use.mask
+++ b/profiles/arch/amd64/use.mask
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Unmask the flag which corresponds to ARCH.
@@ -6,6 +6,10 @@
 
 # SECTION: Unmask
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernels are supported here.
+-dist-kernel
+
 # Andreas Sturmlechner <[email protected]> (2020-06-06)
 # sci-libs/mkl works on amd64
 -mkl

diff --git a/profiles/arch/amd64/use.stable.mask 
b/profiles/arch/amd64/use.stable.mask
index b83b8507d91..ba88ea41c2e 100644
--- a/profiles/arch/amd64/use.stable.mask
+++ b/profiles/arch/amd64/use.stable.mask
@@ -1,9 +1,13 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # This file requires eapi 5 or later. New entries go on top.
 # Please use the same syntax as in use.mask
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernel rebuilds are supported on stable yet.
+dist-kernel
+
 # Andreas Sturmlechner <[email protected]> (2020-06-06)
 # sci-libs/mkl is not stable, needs online registration to even run pkg_setup
 mkl

diff --git a/profiles/arch/arm/use.mask b/profiles/arch/arm/use.mask
index 5af05ca0a69..600ca159c4e 100644
--- a/profiles/arch/arm/use.mask
+++ b/profiles/arch/arm/use.mask
@@ -1,9 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Unmask the flag which corresponds to ARCH.
 -arm
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernels are supported here.
+-dist-kernel
+
 # Unmask arm arch specific flags
 -cpu_flags_arm_iwmmxt
 -cpu_flags_arm_iwmmxt2

diff --git a/profiles/arch/arm/use.stable.mask 
b/profiles/arch/arm/use.stable.mask
index d969a69e4d3..0edb74fb7ac 100644
--- a/profiles/arch/arm/use.stable.mask
+++ b/profiles/arch/arm/use.stable.mask
@@ -1,9 +1,13 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # This file requires eapi 5 or later. New entries go on top.
 # Please use the same syntax as in use.mask
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernel rebuilds are supported on stable yet.
+dist-kernel
+
 # Sam James <[email protected]> (2020-12-22)
 # Not yet stable
 lirc

diff --git a/profiles/arch/arm64/use.mask b/profiles/arch/arm64/use.mask
index 238d22b897c..3f63db907c7 100644
--- a/profiles/arch/arm64/use.mask
+++ b/profiles/arch/arm64/use.mask
@@ -1,9 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Unmask the flag which corresponds to ARCH.
 -arm64
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernels are supported here.
+-dist-kernel
+
 # Sam James <[email protected]> (2020-10-08)
 # PyPy3 works on arm64
 -python_targets_pypy3

diff --git a/profiles/arch/arm64/use.stable.mask 
b/profiles/arch/arm64/use.stable.mask
index 4afbfad4164..8ba26c22d2c 100644
--- a/profiles/arch/arm64/use.stable.mask
+++ b/profiles/arch/arm64/use.stable.mask
@@ -1,9 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 #
 # This file requires eapi 5 or later. New entries go on top.
 # Please use the same syntax as in use.mask
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernel rebuilds are supported on stable yet.
+dist-kernel
+
 # Sam James <[email protected]> (2020-12-23)
 # dev-lang/luajit is not yet stable
 lua_single_target_luajit

diff --git a/profiles/arch/base/use.mask b/profiles/arch/base/use.mask
index ba124ae0487..887839c4815 100644
--- a/profiles/arch/base/use.mask
+++ b/profiles/arch/base/use.mask
@@ -1,6 +1,10 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernels are not supported on all architectures.
+dist-kernel
+
 # Andreas Sturmlechner <[email protected]> (2020-06-06)
 # sci-libs/mkl is only supported on specific architectures
 mkl

diff --git a/profiles/arch/powerpc/ppc64/64le/use.mask 
b/profiles/arch/powerpc/ppc64/64le/use.mask
index abc4d0b9c1b..e0ecc03fcaf 100644
--- a/profiles/arch/powerpc/ppc64/64le/use.mask
+++ b/profiles/arch/powerpc/ppc64/64le/use.mask
@@ -1,6 +1,10 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernels are supported here.
+-dist-kernel
+
 # Georgy Yakovlev <[email protected] (2020-10-16)
 # dev-qt/qtwebengine works on ppc64le
 -webengine

diff --git a/profiles/arch/powerpc/ppc64/64le/use.stable.mask 
b/profiles/arch/powerpc/ppc64/64le/use.stable.mask
index 1cda5eff133..4efce43db19 100644
--- a/profiles/arch/powerpc/ppc64/64le/use.stable.mask
+++ b/profiles/arch/powerpc/ppc64/64le/use.stable.mask
@@ -1,6 +1,10 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernel rebuilds are supported on stable yet.
+dist-kernel
+
 # Georgy Yakovlev <[email protected]> (2020-01-21)
 # works, but deps not stable yet
 vaapi

diff --git a/profiles/arch/x86/use.mask b/profiles/arch/x86/use.mask
index 4b6386ca8b2..8a86d7306ed 100644
--- a/profiles/arch/x86/use.mask
+++ b/profiles/arch/x86/use.mask
@@ -1,9 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Unmask the flag which corresponds to ARCH.
 -x86
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernels are supported here.
+-dist-kernel
+
 # Andreas Sturmlechner <[email protected]> (2020-06-06)
 # sci-libs/mkl works on x86
 -mkl

diff --git a/profiles/arch/x86/use.stable.mask 
b/profiles/arch/x86/use.stable.mask
index 0e1538cf887..3b3d1cfe3b1 100644
--- a/profiles/arch/x86/use.stable.mask
+++ b/profiles/arch/x86/use.stable.mask
@@ -1,9 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # This file requires eapi 5 or later. New entries go on top.
 # Please use the same syntax as in use.mask
 
+# Michał Górny <[email protected]> (2021-01-07)
+# Prebuilt kernel rebuilds are supported on stable yet.
+dist-kernel
+
 # Sam James <[email protected]> (2020-11-10)
 # media-gfx/openvdb is not stable on x86
 # ... and has failing tests right now anyway

diff --git a/profiles/use.desc b/profiles/use.desc
index e51db598202..6ede79cb784 100644
--- a/profiles/use.desc
+++ b/profiles/use.desc
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Keep them sorted
@@ -62,6 +62,7 @@ dbus - Enable dbus support for anything that needs it (gpsd, 
gnomemeeting, etc)
 debug - Enable extra debug codepaths, like asserts and extra output. If you 
want to get meaningful backtraces see 
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 dedicated - Add support for dedicated game servers (some packages do not 
provide clients and servers at the same time)
 dga - Add DGA (Direct Graphic Access) support for X
+dist-kernel - Enable subslot rebuilds on Distribution Kernel upgrades
 djvu - Support DjVu, a PDF-like document format esp. suited for scanned 
documents
 doc - Add extra documentation (API, Javadoc, etc). It is recommended to enable 
per package instead of globally
 dri - Enable direct rendering: used for accelerated 3D and some 2D, like DMA

Reply via email to