class

Bootstrap::StepRunner

Inherits Reference < Object

StepRunner performs tasks using the strategy metadata from BuildPhase and BuildStep.

Until utilities are fully developed here, StepRunner shells out via ProcessRunner for some taks.

StepRunner utilizes:

  • BuildPlan for reading the build plan with potential overrides
  • ProcessRunner for invoking and logging external executables
  • AlpineSetup for Alpine seed rootfs configuration

Constructors

new(workspace : SysrootWorkspace, clean_build_dirs : Bool = true, skip_existing_sources : Bool = false)
Source

Instance methods

clean_build_dirs
Source
clean_build_dirs=(clean_build_dirs : Bool)
Source
download_and_verify(spec : SourceSpec, target_dir : Path = sources_dir) : Path

Download a source tarball (if missing) into the source cache and verify its checksum before returning the cached path.

Source
download_sources(step : BuildStep) : Array(Path)

Download all configured package sources and return their cached paths.

Source
extract_sources(step : BuildStep) : Nil

Extract all configured package sources into the workdir.

When skip_existing_sources is enabled, archives with an existing build_directory are skipped to avoid overwriting previously extracted sources during resume flows.

Source
report_dir
Source
report_dir=(report_dir : String | Nil)
Source
run(phase : BuildPhase, step : BuildStep)

Run a build step using the selected strategy.

The effective install destination is computed from the phase defaults and optional step overrides:

  • install_prefix selects the prefix used by configure/CMake.
  • destdir (when present) is passed to install commands to stage files into a rootfs directory without needing chroot/pivot_root.
  • env combines phase env with step env, with step keys overriding.
Source
run_alt_cmd(phase : BuildPhase, step : BuildStep, command : String) : Process::Status
Source
skip_existing_sources

When true, extract-sources skips archives that already extracted their build directories.

Source
skip_existing_sources=(skip_existing_sources : Bool)

When true, extract-sources skips archives that already extracted their build directories.

Source
with_phase_environment(phase : BuildPhase, &)

Apply phase-level environment variables for the duration of block.

This ensures phase-scoped environment values are available to helper routines that might spawn processes without an explicit env hash. The prior environment is restored after block returns (or raises).

Source
workspace
Source