run

Function run 

Source
pub fn run<O: InstallObserver>(
    ctx: &AppContext,
    package_ref: PackageRef,
    ignore_checksum_security: bool,
    observer: &mut O,
) -> Result<InstallOutcome>
Expand description

Execute the full install workflow for a resolved package reference.

The function performs the following high-level steps:

  1. Resolve the package reference against the catalog.
  2. Select an installer and build the engine-specific execution context.
  3. Prepare the install target by rejecting conflicting database state and clearing stale failed records.
  4. Mark the package as installing and create a temporary workspace rooted in the package/version pair.
  5. Download and verify the installer while forwarding progress callbacks.
  6. Hand the verified payload to the selected engine.
  7. Roll back partial state on cancellation or failure, or mark the install as successful when the engine completes.

On success, the returned InstallOutcome contains the final install record plus any legacy checksum algorithms that were tolerated during verification. On error, the function maps the underlying failure into InstallError and makes a best effort to clean up database and filesystem artifacts before returning.