Module state

Module state 

Source
Expand description

Database and filesystem state helpers for installation.

This module is responsible for the persistence side of the install flow. It validates whether a package can be installed, removes stale failed state, records the package as installing, and flips the status to either installed or failed once the engine phase completes.

Keeping these transitions isolated makes the outer install orchestration easier to reason about and gives rollback a single place to update package status.

Structsยง

CommandConflict
A command already owned by a different package.
InstallTargetInspection
Read-only inspection of the current install target.

Enumsยง

InstallStateError
Errors raised while preparing or updating install state.
InstallTargetState
The current state of an install target before any mutation occurs.

Functionsยง

inspect_command_conflicts ๐Ÿ”’
inspect_install_target_state ๐Ÿ”’
inspect_install_target_with_commands
Inspect the target install state without mutating the database or disk.
installing_package ๐Ÿ”’
mark_failed
Mark a package as failed.
mark_installing
Insert a package record marked as installing.
prepare_install_target
Validate the target install path and clear stale failed state if present.
prepare_install_target_with_commands
Validate the target install path and clear stale failed state if present.
update_installing_identity

Type Aliasesยง

Result
Convenience result type for install-state operations.