mod easystack

module easystack

Emit an EasyBuild easystack file from a solved lock.

A lock says what to install and in which order it was selected. An easystack is the format EasyBuild itself consumes for that, eb --easystack file.yml, and the format EESSI’s software layer is built from, where the files live at easystacks/software.eessi.io/<version>/ and are the unit of a build PR. Emitting one turns a solve into something both a site pipeline and an upstream contribution can run without a human retyping the list.

The format, since EasyBuild 4.7: a top-level easyconfigs key whose entries are either a filename or a single-key mapping from filename to options, where each option is an eb command-line flag without its dashes.

Types

type EasystackOptions

Per-easyconfig eb options, keyed by the easyconfig filename they apply to.

Keys are written as they appear on the command line without the leading dashes, which is what EasyBuild reads: from-commit, accept-eula-for, include-systems.

Functions

fn easystack_from_paths(paths: &[&str], options: &EasystackOptions) -> String

Render an easystack from easyconfig paths in the order they are given.

A lock is sorted by name so two locks diff cleanly, which is the wrong order for a build. A sequence from crate::build_order is already the order to build in, and writing it out sorted would throw away the only thing it knows that a lock does not.

fn lock_to_easystack(lock: &StackLock, options: &EasystackOptions) -> String

Render a lock as an easystack document.

Entries keep the order of the lock rather than being re-sorted, so a diff between two easystacks reads the same way as a diff between the locks they came from. A package whose lock entry names no easyconfig file is skipped: EasyBuild cannot be asked to build a file that was never on disk, and a silently wrong filename would fail deep in a pipeline rather than here.