Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide legacy software #8

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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