From 44c959469bac4d091280f6d69ec467f1f905e7af Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 7 Nov 2024 09:24:09 +0100 Subject: [PATCH] PackageInfo.g: fix AvailabilityTest return value --- PackageInfo.g | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/PackageInfo.g b/PackageInfo.g index f6de1ec..187aea4 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -69,14 +69,13 @@ Dependencies := rec( ), AvailabilityTest := function() - local path; - # test for existence of the compiled binary - path := DirectoriesPackagePrograms("4ti2gap"); - if not "4ti2gap" in SHOW_STAT() and - Filename(path, "4ti2gap.so") = fail then - return fail; - fi; - return true; + if not IsKernelExtensionAvailable("4ti2gap") then + LogPackageLoadingMessage(PACKAGE_WARNING, + ["the kernel module is not compiled, ", + "the package cannot be loaded."]); + return false; + fi; + return true; end,