mod upstream¶
- module upstream¶
The newest stable upstream release of an EasyBuild recipe.
The backend is read from the recipe’s own
source_urls: PyPI, GitHub, GitLab, CRAN, crates.io, NVIDIA’s redistrib manifests, a SourceForge file feed, or a plain HTTP directory. A distribution aggregator such as Repology is not a source of truth here: it orders the versions distributions carry, merges unrelated projects under one name (wget and wget2), and cannot name a package without a per-ecosystem prefix.Candidates pass a staged filter and every rejection keeps its reason: drafts, pre-releases and yanked releases first, then the per-package override (include and exclude patterns, ignored versions, a series policy such as odd minor numbers being development releases, a highest major), then the survivors are sorted with
cmp_versionand the first one wins. GitHub’s/releases/latestis not used: it sorts by date, so a backport can be “latest”.Variables
- const BUILTIN_OVERRIDES: &str¶
The overrides eb-stack ships, keyed by EasyBuild name.
Functions
- fn bump_version(report: &LatestReport) -> Result<Option<String>>¶
The version
package bump --latestmoves to:Nonewhen the recipe already has the newest stable release.Errors
No backend answered, or no stable release survived the filter.
- fn decide(name: &str, current: &str, backend: &str, mut candidates: Vec<Candidate>, ov: Option<&Override>) -> Result<LatestReport>¶
Apply the staged filter and pick the newest survivor.
- fn detect_backend(ec: &ResolvedEasyconfig, ov: Option<&Override>) -> Option<Backend>¶
The backend the recipe names, or the one its override sets.
- fn is_prerelease(version: &str) -> bool¶
A version string that names a pre-release, including PEP 440 forms.
- fn latest(ec: &ResolvedEasyconfig, overrides: &BTreeMap<String, Override>, client: &dyn RegistryClient) -> Result<LatestReport>¶
The newest stable upstream release of one parsed recipe.
- fn list_candidates(backend: &Backend, name: &str, client: &dyn RegistryClient) -> Result<Vec<Candidate>>¶
Every version the backend lists, before filtering. Already-dropped entries (drafts, pre-release flags, yanked files) carry their reason.
- fn load_overrides(paths: &[impl AsRef<Path>]) -> Result<BTreeMap<String, Override>>¶
The shipped overrides, then each file in order; later entries win.
- fn parse_overrides(text: &str) -> Result<BTreeMap<String, Override>>¶
Parse an overrides TOML document.
- fn render_text(report: &LatestReport) -> String¶
Render one report as the text
package latestprints: one line per decision, then every candidate with what happened to it.
- fn tag_version(tag: &str, name: &str) -> String¶
Strip a tag down to the version:
v1.2.3,release-1.2.3,pkg-1.2.3.
Enums
- enum Backend¶
Where a package’s releases are listed.
- Github¶
A GitHub repository’s releases, falling back to its tags.
- owner: String¶
Repository owner.
- repo: String¶
Repository name.
- Gitlab¶
A GitLab project’s releases, falling back to its tags.
- host: String¶
GitLab host,
gitlab.com.
- path: String¶
Project path,
group/project.
- Directory¶
An HTTP directory listing, scanned for <prefix><version><suffix> links.
- url: String¶
The listing URL.
- prefix: String¶
File name text before the version.
- suffix: String¶
File name text after the version; empty matches any archive extension.
- NvidiaRedist¶
NVIDIA’s redistrib_<release>.json manifests under developer.download.nvidia.com/compute/<product>/redist/.
- product: String¶
cuda,cudnn, …
- component: Option<String>¶
The manifest key whose
versionthe recipe carries (cudnn); absent when the release label is the version (the CUDA toolkit).
Implementations
Structs and Unions
- struct Candidate¶
One version a backend listed, and what the filter did with it.
- raw: String¶
The tag or release name as listed.
- version: String¶
The version EasyBuild would write.
- dropped: Option<String>¶
Why it was dropped; absent when it survived.
- struct LatestReport¶
What
package latestdecides for one recipe.- name: String¶
EasyBuild name.
- current: String¶
Version the recipe has.
- backend: String¶
Where the versions were read,
pypi:tqdm.
- newest: Option<String>¶
The newest surviving version; absent when nothing survived.
- state: String¶
current,behind,pinned, orunknown.
- reason: Option<String>¶
The override’s reason, or why the backend could not be read.
- struct Override¶
Per-package settings, keyed by EasyBuild name in the overrides TOML.
- backend: Option<String>¶
pypi,github,gitlab,cran,crates,directory, ornonefor a recipe that has no upstream release to follow.
- project: Option<String>¶
Project for the backend:
owner/repo, a PyPI or CRAN name, or a URL.%(name)s,%(namelower)s,%(version)s,%(version_major)sand%(version_major_minor)stake the recipe’s values.
- include: Option<String>¶
Only versions matching this pattern are kept.
- exclude: Option<String>¶
Versions matching this pattern are dropped.
- ignored: Vec<String>¶
Versions that are never offered.
- series_policy: Option<String>¶
odd-minor-devel: an odd minor number is a development release.
- max_major: Option<u64>¶
Versions with a higher first number are a different product line.
- pin: Option<String>¶
Keep exactly this version.
- reason: Option<String>¶
Why the override exists. Shown in every report.