mod provided

module provided

Fail when a build list names software a baseline already provides.

A site layer is the software EESSI does not install. stack solve –build-list-excludes-baseline writes that list. A later edit can put an EESSI module back on it. stack provided reads the list and the baseline (an installed-module listing, a stack lock, or both) and fails when a line’s package name is one the baseline has, ignoring version and toolchain. --allow keeps a second version the site was asked for.

The same pass also rejects a toolchain other than the foss-2026.1 hierarchy (GCCcore-15.2.0 below it), a per-line --hooks or --hook flag, and a name that only a separate family lock covers. Those are errors. Group-restricted names are warnings, and only when --licensed or --licensed-file names them.

Functions

fn run_provided(args: &ProvidedRequest) -> Result<ProvidedReport>

Read the lists and compare each line’s package name with the baseline.

Enums

enum ProvidedFormat

How stack provided prints.

Text

The provided / unparsed lines, then any further findings, then a count.

Github

GitHub Actions workflow commands.

Json

One JSON document.

Implementations

impl ProvidedFormat

Functions

fn parse(value: &str) -> Result<Self>

text, github, or json.

Structs and Unions

struct LineNote

One further finding on a build-list line.

list: String

Build list the line came from.

line: usize

1-based line in that file.

file: String

The line’s easyconfig, as written.

name: String

Package name parsed from that filename.

detail: String

The rest of the message, after the file, name, list, and line.

struct ProvidedHit

One build-list line whose package the baseline already provides.

list: String

Build list the line came from.

file: String

The line’s easyconfig, as written.

name: String

Package name parsed from that filename.

line: usize

1-based line in the build list.

struct ProvidedReport

What stack provided found.

hits: Vec<ProvidedHit>

Lines whose package the baseline provides and --allow does not name.

unparsed: Vec<UnparsedLine>

.eb lines whose filename names no package.

allowed: usize

Lines --allow kept off hits.

provided: usize

Distinct package names the baseline provides.

toolchain: Vec<LineNote>

Lines whose toolchain is not 2026.1 or GCCcore-15.2.0 below it.

hooks: Vec<LineNote>

Lines that set --hooks or --hook.

family: Vec<LineNote>

Lines whose name belongs to a family lock rather than the site layer.

licensed: Vec<LineNote>

Lines that name a group-restricted package. Warnings.

strict: bool

Whether a licensed warning fails the command.

stdout: String

Text for stdout. JSON when the request asked for it.

Implementations

impl ProvidedReport

Functions

fn failure(&self) -> Option<String>

The stderr line when the check failed, or None when it passed.

struct ProvidedRequest

Arguments for stack provided.

build_lists: Vec<PathBuf>

Jenkins or path-style build lists. Repeatable.

installed: Vec<PathBuf>

Installed-module listings, Name/Version or a bare name. Repeatable.

baseline_lock: Option<PathBuf>

Stack lock whose package names count as provided.

allow: Vec<String>

Package names that may stay on the list. Matched without regard to case.

This skips a provided hit and a family-lock hit. It does not skip a wrong toolchain or a --hooks flag.

family_locks: Vec<PathBuf>

Stack locks of families the foss baseline cannot see, such as lfoss. A name that is only in one of these is not reported as site layer.

licensed: Vec<String>

Extra group-restricted names. Combined with --licensed-file.

licensed_file: Option<PathBuf>

Name list that replaces passing each group-restricted name as --licensed. Absent, and with no --licensed, there is no warning.

json: bool

Print the report as JSON. Wins over format when set.

format: ProvidedFormat

Text, GitHub workflow commands, or JSON.

strict: bool

Exit 1 when a group-restricted warning remains.

struct UnparsedLine

One build-list line that names no package.

list: String

Build list the line came from.

file: String

The line’s easyconfig, as written.

line: usize

1-based line in the build list.