Skip to content

Commit

Permalink
set default basedir os to rocky8
Browse files Browse the repository at this point in the history
  • Loading branch information
smoors committed Dec 13, 2023
1 parent 4b66a74 commit 63539a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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.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

0 comments on commit 63539a9

Please sign in to comment.