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:
- Resolve the package reference against the catalog.
- Select an installer and build the engine-specific execution context.
- Prepare the install target by rejecting conflicting database state and clearing stale failed records.
- Mark the package as installing and create a temporary workspace rooted in the package/version pair.
- Download and verify the installer while forwarding progress callbacks.
- Hand the verified payload to the selected engine.
- 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.