From c5dc07c475a7beca0cc2be4e4915e0da6e670406 Mon Sep 17 00:00:00 2001 From: Mike Pagano Date: Sun, 14 Jun 2026 15:31:26 -0400 Subject: [PATCH] eclass/kernel-2.eclass: Allow skipping of patch check Introduce a new variable to skip the sanity check that ensures a point release ebuild contains that specific patch. This is usful for X.Y.0 release where there is no separate point relese incremental patch If K_NO_VERSION_CHECK is set, this check will be skipped. Signed-off-by: Mike Pagano --- eclass/kernel-2.eclass | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index d9d4304e86727..8a675db7a74aa 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -181,6 +181,15 @@ # this is useful for things like wolk. IE: # EXTRAVERSION would be something like : -wolk-4.19-r1 +# @ECLASS_VARIABLE: K_NO_VERSION_CHECK +# @DEFAULT_UNSET +# @DESCRIPTION: +# If this is set, skip the sanity check that make sure +# a kernel version patch number is present that +# matches the kernel version indicated by the build name +# This should be used in X.Y.0 kernels as the initial +# ebuild does not contain a separate point release + # @ECLASS_VARIABLE: K_WANT_GENPATCHES # @DEFAULT_UNSET # @DESCRIPTION: @@ -1131,7 +1140,7 @@ unipatch() { fi done < <(find "$KPATCH_DIR" -type f -print0) - if [[ -z ${KV_PATCH_FOUND} ]]; then + if [[ -z ${K_NO_VERSION_CHECK} && -z ${KV_PATCH_FOUND} ]]; then eerror "GENPATCHES does not contain linux patch ${OKV}" eerror "Please check your ebuild for the proper K_GENPATCHES_VER=N" die "GENPATCHES appears to be missing Linux patch ${OKV}"