From f6c28ea0d042fb75c7701c55ce84e1c90f974f31 Mon Sep 17 00:00:00 2001 From: Mike Pagano Date: Sat, 9 May 2026 16:01:03 -0400 Subject: [PATCH] kernel-2.eclass: While chkin if kern ver is pres, support subdirs Closes: https://bugs.gentoo.org/974322 Signed-off-by: Mike Pagano --- eclass/kernel-2.eclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 90013b18083c9..44b1bce504a97 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1123,13 +1123,14 @@ unipatch() { # Iterate through patch and look for OKV if [[ -n "${K_WANT_GENPATCHES}" ]]; then KV_PATCH_FOUND= - for file in ${KPATCH_DIR}/*; do + while IFS= read -r -d '' file; do filename="${file##*/}" if [[ "$filename" == *"${OKV}"* ]]; then KV_PATCH_FOUND=yes break; fi - done + done < <(find "$KPATCH_DIR" -type f -print0) + if [[ -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"