From 3ee4f2989e63e91ed9f4ba5a6f04c83989c18dcc Mon Sep 17 00:00:00 2001 From: Zach Dykstra Date: Tue, 31 Dec 2024 11:27:22 -0600 Subject: [PATCH] bin/generate-zbm: require at least one kernel version value Some distributions create generic symlinks to a kernel; such as vmlinuz.old. These symlinks do not encode any version information in the filename. On ARM systems, the kernel sometimes does not contain a version that can be detected via dumping strings from the file. This leads to a case where neither version string is defined, and the assumption was that one would always be defined. --- bin/generate-zbm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/generate-zbm b/bin/generate-zbm index 67e2e9db2..71bdd524b 100755 --- a/bin/generate-zbm +++ b/bin/generate-zbm @@ -609,6 +609,9 @@ sub kernelVersion { } } + # Kernel is unusable if no version could be detected + return if ( not nonempty $filever and not nonempty $namever ); + # If only one is defined, that's the version unless ( nonempty $filever ) { Log("No version found in kernel strings, using $namever from path $kernel");