commit:     4a056f17b0e9e65d74a8008c9eaf32db3759aeb3
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  6 20:36:23 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Sep  6 20:43:35 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a056f17

linux-mod-r1.eclass: silence spurious warning with _p* kernels

Like noted in the comment, ideally would want to check for the
actual matching version but we'd need to test+sanitize KV_EXTRA
and figure out if it's really a version component as it could be
anything.

_p being used should be a rare event and it shouldn't be a big
deal if the check ignores it.

Skipping ML review given trivial and is just about a warning.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 eclass/linux-mod-r1.eclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 91dca82c8f35..3e6bd159819e 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -1224,8 +1224,11 @@ _modules_sanity_kernelversion() {
                fi
        fi
 
+       # wrt *, KV_EXTRA can have e.g. -p1 used by dist-kernel's version as
+       # _p1, ideally would check it too but this string can contain about
+       # anything so ignore it rather than try to figure out what it is
        if use dist-kernel &&
-               ! has_version 
"~virtual/dist-kernel-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+               ! has_version 
"=virtual/dist-kernel-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}*"
        then
                ewarn
                ewarn "The kernel modules in ${CATEGORY}/${PN} are being built 
for"

Reply via email to