summaryrefslogtreecommitdiff
path: root/eclass/linux-mod-r1.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-30 17:49:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-30 17:49:05 +0000
commit28d8acbb30a9ebda81447e5e3f5210a438ba7d24 (patch)
tree6d6b6b0a1aca19e8118845870c9e6a25bad27963 /eclass/linux-mod-r1.eclass
parent840a65e2af3f2cc7527e723a28f6e627a9592fb7 (diff)
gentoo auto-resync : 30:01:2024 - 17:49:05
Diffstat (limited to 'eclass/linux-mod-r1.eclass')
-rw-r--r--eclass/linux-mod-r1.eclass20
1 files changed, 19 insertions, 1 deletions
diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 67a4b64eb481..8d384c2b30c8 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: linux-mod-r1.eclass
@@ -650,6 +650,24 @@ _modules_prepare_kernel() {
fi
linux-info_pkg_setup
+
+ if use dist-kernel &&
+ ! has_version "~virtual/dist-kernel-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ then
+ ewarn
+ ewarn "The kernel modules in ${CATEGORY}/${PN} are being built for"
+ ewarn "kernel version ${KV_FULL}. But this does not match the"
+ ewarn "installed version of virtual/dist-kernel."
+ ewarn
+ ewarn "If this is not intentional, the problem may be corrected by"
+ ewarn "using \"eselect kernel\" to set the default kernel version to"
+ ewarn "the same version as the installed version of virtual/dist-kernel."
+ ewarn
+ ewarn "If the distribution kernel is being downgraded, ensure that"
+ ewarn "virtual/dist-kernel is also downgraded to the same version"
+ ewarn "before rebuilding external kernel modules."
+ ewarn
+ fi
}
# @FUNCTION: _modules_prepare_sign