pub fn install(
archive: &Path,
expected: &str,
target: TargetTuple,
cache: &Path,
) -> Result<Installed, CliError>Expand description
Check an artifact and install it as the sysroot for a target.
The steps are §13.8’s, in order: the hash, the unpack, the manifest against the tree and the tree against the manifest, the rename. Nothing is written outside the cache and nothing outside the cache is read except the archive.
§Errors
Every step, and each message says which step. An artifact for the wrong target, a missing
manifest, a file whose hash disagrees with the record, a file no line names, and anything the
filesystem or tar refuses. A failure leaves the destination as it was: the work happens in a
staging directory and the last thing that happens is the rename.