public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] kernel-install.eclass: Fix updating symlinks with -p kernels
@ 2025-10-03 12:39 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2025-10-03 12:39 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Closes: https://bugs.gentoo.org/963683
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/kernel-install.eclass | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 47afe6e750105..f9f16c0d5f634 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -263,12 +263,14 @@ kernel-install_can_update_symlink() {
 	# strip KV_LOCALVERSION, we want to update the old kernels not using
 	# KV_LOCALVERSION suffix and the new kernels using it
 	symlink_ver=${symlink_ver%${KV_LOCALVERSION}}
+	# strip -p* revision
+	local symlink_ver_no_rev=${symlink_ver%-p[0-9]*}
 
-	# if ${symlink_ver} contains anything but numbers (e.g. an extra
-	# suffix), it's not our kernel, so leave it alone
-	[[ -n ${symlink_ver//[0-9.]/} ]] && return 1
+	# if ${symlink_ver_no_rev} contains anything but numbers (e.g.
+	# an extra suffix), it's not our kernel, so leave it alone
+	[[ -n ${symlink_ver_no_rev//[0-9.]/} ]] && return 1
 
-	local symlink_pkg=${CATEGORY}/${PN}-${symlink_ver}
+	local symlink_pkg=${CATEGORY}/${PN}-${symlink_ver/-p/_p}
 	# if the current target is either being replaced, or still
 	# installed (probably depclean candidate), update the symlink
 	has "${symlink_ver}" ${REPLACING_VERSIONS} && return 0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-03 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03 12:39 [gentoo-dev] [PATCH] kernel-install.eclass: Fix updating symlinks with -p kernels Michał Górny

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