eb-local.lmodcache¶
- module eb-local.lmodcache src/lmodcache.zig[source][autodoc]¶
eb-local lmod-cache: write the spider cache Lmod trusts.Lmod treats a timestamp newer than
spiderT.luaas a stale cache and then ignores the modules that file names. The cache is written only afterspidersucceeds, and the timestamp is then set one second older than the cache file.
Types¶
Functions¶
- pub fn moduleDirs(a: std.mem.Allocator, spec: []const u8) ![]const []const u8[source][autodoc]¶
Directories in a colon-separated module path, empty segments dropped.
- pub fn spiderArgv(a: std.mem.Allocator, spider: []const u8, dirs: []const []const u8) ![]const []const u8[source][autodoc]¶
spider -o spiderTand one argument per module directory.
- pub fn olderThan(cache: std.Io.Timestamp) std.Io.Timestamp[source][autodoc]¶
One second before the cache file, which is what makes Lmod trust it.
- pub fn modulepathForArch(a: std.mem.Allocator, archdir: []const u8, accel_alls: []const []const u8) ![]const u8[source][autodoc]¶
Colon-separated paths for
archdir, with accelerator trees prepended like EESSI’s script.
- pub fn discoverTargets(a: std.mem.Allocator, opts: Options) ![]Target[source][autodoc]¶
Discover CPU targets under
prefix, matching EESSI’supdate_lmod_caches.shlayout.
- pub fn runUpdate(io: std.Io, a: std.mem.Allocator, update_cmd: []const u8, target: Target) u8[source][autodoc]¶
Run Lmod’s
update_lmod_system_cache_filesfor one target.
- pub fn run(io: std.Io, a: std.mem.Allocator, env: *const std.process.Environ.Map, opts: Options) u8[source][autodoc]¶
Write
cache_dir/spiderT.luafrom spider’s stdout, then the timestamp. A spider that cannot start, exits non-zero, or writes nothing leaves both files as they were. Returns the process exit status.