Part of
https://github.com/gentoo/gentoo/pull/37327
From bcbc9191becab3cda6af8f9f2c0e1da6ebe395e1 Mon Sep 17 00:00:00 2001
From: James Calligeros <
jcalligeros99@gmail.com>
Date: Sat, 13 Jul 2024 22:47:33 +1000
Subject: [PATCH] kernel-install.eclass: improve kernel version check
Now that we have an improved version check in kernel-build.eclass,
copy it here so that the two eclasses match.
Signed-off-by: James Calligeros <
jcalligeros99@gmail.com>
---
eclass/kernel-install.eclass | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index e0716b63a2489..59bab9c0af08d 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -595,11 +595,11 @@ kernel-install_pkg_preinst() {
local expected_ver=$(dist-kernel_PV_to_KV "${PV}")
if [[ ${KV_FULL} != ${expected_ver}* ]]; then
- eerror "Kernel release mismatch!"
- eerror " expected (PV): ${expected_ver}*"
- eerror " found: ${KV_FULL}"
- eerror "Please verify that you are applying the correct patches."
- die "Kernel release mismatch (${KV_FULL} instead of ${expected_ver}*)"
+ eerror "Kernel version does not match PV!"
+ eerror "Source version: ${KV_FULL}"
+ eerror "Expected (PV*): ${expected_ver}*"
+ eerror "Please ensure you are applying the correct patchset."
+ die "Kernel version mismatch: got ${KV_FULL}, expected ${expected_ver}*"
fi