Skip to content

Commit

Permalink
Improve rpmdb consistency check (#21)
Browse files Browse the repository at this point in the history
* Check rpmdb is fine

Restrict zypper to local repository, it catches system db
inconsistencies.

* cleanup error handling

* remove zypper verify call

Will create a separate plugin for zypper verify
  • Loading branch information
fcrozat authored Sep 25, 2024
1 parent 041cdf4 commit 22d997c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/rpmdb-consistency.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

run_checks() {
zypper --no-refresh --quiet verify --dry-run
test $? -ne 0 && exit 1
# check rpm DB itself (need to override lock path, the default one is read-only)
rpm -D "%_rpmlock_path /run/rpmdb" --verifydb || exit 1
}

case "$1" in
Expand Down

0 comments on commit 22d997c

Please sign in to comment.