diff --git a/SPECS/kmod-wireguard.spec b/SPECS/kmod-wireguard.spec index c543b9f..1a76ec2 100644 --- a/SPECS/kmod-wireguard.spec +++ b/SPECS/kmod-wireguard.spec @@ -6,7 +6,7 @@ # Otherwise the latest installed kernel-devel version later than # %%{kernel_version_min} will be used. -%global kernel_version_latest %({ echo %{kernel_version_min}; rpm --query kernel-devel --queryformat '%%{VERSION}-%%{RELEASE}\\\n' | grep -v kernel-devel; } | sort -V | sed -e '0,/^%{kernel_version_min}$/d' | tail -n 1) +%global kernel_version_latest %({ echo %{kernel_version_min}; rpm --query kernel-devel --queryformat '%%{VERSION}-%%{RELEASE}\\\n' | grep -v "package kernel-devel is not installed"; } | sort -V | sed -e '0,/^%{kernel_version_min}$/d' | tail -n 1) %if "%{kernel_version_latest}" != "" %{!?kernel_version:%{expand:%%global kernel_version %{kernel_version_latest}}}