Skip to main content

Module guardrails

Module guardrails 

Source
Expand description

Pre-transaction guardrails: pacman db-lock detection, disk-space checks, and sync-database freshness checks with actionable guidance.

These checks run before install/remove/update transactions (CLI and TUI) and are read-only: they never mutate the system and are therefore safe in dry-run mode.

Structs§

GuardrailContext
Filesystem locations and thresholds consulted by the guardrail checks.

Enums§

GuardrailIssue
A single guardrail finding carrying the data needed to render an actionable message.
GuardrailOperation
The kind of transaction a guardrail check runs for.

Functions§

check_db_lock
What: Check whether the pacman database is locked.
check_disk_space
What: Check whether the pacman cache filesystem has enough free space.
check_sync_db_freshness
What: Check whether the pacman sync databases are stale.
run_guardrails
What: Run all guardrail checks for a transaction.