From 417753097ad2a95d62f455f5414372e0c1034f63 Mon Sep 17 00:00:00 2001 From: Joe Edwards <80713360+Joseph-Edwards@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:03:48 +0100 Subject: [PATCH] Update kernel module checking (#45) --- .github/workflows/CI.yml | 3 --- PackageInfo.g | 9 +++++---- init.g | 9 ++------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 77d3162..e17735d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,9 +27,6 @@ jobs: - master - stable-4.13 - stable-4.12 - - stable-4.11 - - stable-4.10 - - stable-4.9 ABI: [''] include: - gap-branch: master diff --git a/PackageInfo.g b/PackageInfo.g index ee30cd4..47b87da 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -100,7 +100,7 @@ PackageDoc := rec( ), Dependencies := rec( - GAP := ">=4.10", + GAP := ">=4.12", NeededOtherPackages := [ ["GAPDoc", ">= 1.2"], ["IO", ">= 4.1"], @@ -111,9 +111,10 @@ Dependencies := rec( ), AvailabilityTest := function() - if not "cvec" in SHOW_STAT() and - Filename(DirectoriesPackagePrograms("cvec"), "cvec.so") = fail then - #Info(InfoWarning, 1, "cvec: kernel cvec functions not available."); + if not IsKernelExtensionAvailable("cvec") then + LogPackageLoadingMessage(PACKAGE_WARNING, + ["the kernel module is not compiled, ", + "the package cannot be loaded."]); return fail; fi; return true; diff --git a/init.g b/init.g index d0e2778..02c1681 100644 --- a/init.g +++ b/init.g @@ -13,13 +13,8 @@ ################################ # load kernel function if it is installed: -if (not IsBound(CVEC)) and ("cvec" in SHOW_STAT()) then - # try static module - LoadStaticModule("cvec"); -fi; -if (not IsBound(CVEC)) and - (Filename(DirectoriesPackagePrograms("cvec"), "cvec.so") <> fail) then - LoadDynamicModule(Filename(DirectoriesPackagePrograms("cvec"), "cvec.so")); +if not LoadKernelExtension("cvec") then + Error("failed to load the cvec package kernel extension"); fi; #