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

set default basedir os to rocky8 #9

Merged
merged 1 commit into from
Dec 13, 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.6
Release: 2
Version: 1.7
Release: 1
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 Dec 13 2023 Samuel Moors <[email protected]>
- Set default basedir OS to Rocky 8
* Wed Nov 29 2023 Ward Poelmans <[email protected]>
- Hide legacy software trees (CO7)
* Thu Nov 09 2023 Alex Domingo <[email protected]>
Expand Down
8 changes: 4 additions & 4 deletions run_lmod_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
fancylogger.logToScreen(True)
fancylogger.setLogLevelInfo()

MODULES_BASEDIR = '/apps/brussel/CO7'
MODULES_BASEDIR = '/apps/brussel/RL8'


def run_cache_create(basedir, archs=None):
Expand Down Expand Up @@ -102,7 +102,7 @@ def get_lmod_config():
}
logger.debug("Found Lmod config: %s", config)
except (ValueError, KeyError, IndexError, TypeError) as err:
raise RuntimeError(f"Failed to parse the Lmod configuration: {err}")
raise RuntimeError(f"Failed to parse the Lmod configuration: {err}") from err

return config

Expand All @@ -116,7 +116,7 @@ def main():
'architecture': ('Specify the architecture to create the cache for. Default: all architectures',
'strlist', 'add', None),
'freshness-threshold': ('The interval in minutes for how long we consider the cache to be fresh',
'int', 'store', 60*7), # cron runs every 6 hours
'int', 'store', 60 * 7), # cron runs every 6 hours
'module-basedir': ('Specify the base dir for the modules', 'str', 'store', MODULES_BASEDIR),
'check-cache-age': ('Show age in seconds of oldest cache and exit', None, 'store_true', False),
}
Expand All @@ -133,7 +133,7 @@ def main():
# give a warning when the cache is older than --freshness-threshold
if age > opts.options.freshness_threshold * 60:
errmsg = "Lmod cache is not fresh"
logger.warn(errmsg)
logger.warning(errmsg)

try:
if opts.options.create_cache:
Expand Down