Module select

Module select 

Source
Expand description

Host-aware installer selection policy for catalog packages.

Catalog packages can publish multiple installers for different architectures, platform families, and install scopes. This module centralizes the ranking rules so callers do not need to replicate host-profile fallback logic in command code.

The selection order is intentionally simple and predictable:

  • ignore installers whose platform metadata does not match the host family
  • prefer installers whose scope matches the current elevation state
  • prefer an installer that exactly matches the host architecture
  • fall back to Architecture::Any when no exact match exists
  • fall back to the first scope-compatible installer if nothing else matches

Structsยง

SelectionContext ๐Ÿ”’
Selection inputs derived from the current runtime host state.

Enumsยง

InstallerScopeKind ๐Ÿ”’
InstallerSelectionError ๐Ÿ”’
Raised when catalog installers cannot be matched to the current host.

Functionsยง

installer_scope_kind ๐Ÿ”’
platform_matches_host ๐Ÿ”’
scope_compatible_installers ๐Ÿ”’
scope_matches_host ๐Ÿ”’
select_installer ๐Ÿ”’
Select the best installer for the current host.