eclass/linux-mod-r1: Sync with Gentoo

It's from Gentoo commit 4a056f17b0e9e65d74a8008c9eaf32db3759aeb3.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2025-09-08 07:07:56 +00:00 committed by Krzesimir Nowak
parent 9eb81b88bd
commit 9caab17c1b

View File

@ -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"