summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-01-03 01:36:04 +0100
committerMichał Górny <mgorny@gentoo.org>2021-01-07 13:39:08 +0100
commitf6088d565d3e3aff0da992aec1ddaca3934b0e14 (patch)
tree18ca35a4d28d4fac52dfc51756f11ab0c5de1f10 /eclass/linux-mod.eclass
parentsys-kernel/vanilla-kernel: Add a PDEP on virtual/prebuilt-kernel (diff)
downloadgentoo-f6088d565d3e3aff0da992aec1ddaca3934b0e14.tar.gz
gentoo-f6088d565d3e3aff0da992aec1ddaca3934b0e14.tar.bz2
gentoo-f6088d565d3e3aff0da992aec1ddaca3934b0e14.zip
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@gentoo.org>
Diffstat (limited to 'eclass/linux-mod.eclass')
-rw-r--r--eclass/linux-mod.eclass13
1 files changed, 10 insertions, 3 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index f5a5a4276369..e0444eacc61a 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