Skip to content

Commit

Permalink
Merge pull request #8 from vub-hpc/co7
Browse files Browse the repository at this point in the history
Hide legacy software
  • Loading branch information
smoors authored Nov 29, 2023
2 parents ab8ca2e + 03c8918 commit 4b66a74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Lmod-config.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: Sitepackage and other config files for Lmod
Name: Lmod-config
Version: 1.5
Release: 1
Version: 1.6
Release: 2
License: GPL
Group: Applications/System
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Expand Down Expand Up @@ -40,6 +40,8 @@ exit 0
%{_libexecdir}/lmod/run_lmod_cache.py

%changelog
* Wed Nov 29 2023 Ward Poelmans <[email protected]>
- Hide legacy software trees (CO7)
* Thu Nov 09 2023 Alex Domingo <[email protected]>
- Hide AlphaFold modules for ColabFold
* Tue Jun 13 2023 Ward Poelmans <[email protected]>
Expand Down
8 changes: 5 additions & 3 deletions SitePackage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ local function visible_hook(modT)
-- modT is a table with: fullName, sn, fn and isVisible
-- The latter is a boolean to determine if a module is visible or not

local mt = MT:singleton()

if modT.fullName:find("cluster/%.") then
modT.isVisible = false
elseif modT.fullName:find("EESSI/") then
Expand All @@ -242,12 +244,12 @@ local function visible_hook(modT)
modT.isVisible = false
elseif modT.fullName:find("AlphaFold/.*ColabFold") then
modT.isVisible = false
elseif module_age(modT) > 5 then
local mt = MT:singleton()
-- do not hide anything if legacy-software is loaded
elseif modT.fn:find("^/apps/brussel/CO7/") then
if not mt:exists('legacy-software') then
modT.isVisible = false
end
elseif module_age(modT) > 5 then
modT.isVisible = false
end
end

Expand Down

0 comments on commit 4b66a74

Please sign in to comment.