Skip to main content

check_db_lock

Function check_db_lock 

Source
pub fn check_db_lock(ctx: &GuardrailContext) -> Option<GuardrailIssue>
Expand description

What: Check whether the pacman database is locked.

Inputs:

  • ctx: Guardrail context providing the lock path and proc dir.

Output:

  • Some(GuardrailIssue::DbLocked) when the lock file exists; None otherwise.

Details:

  • Also reports whether a package manager process is running so callers can distinguish “wait for it to finish” from “remove the stale lock”.