Skip to content

Commit

Permalink
Expose and document rpmdb --verifydb operation
Browse files Browse the repository at this point in the history
After years of BDB, sometimes folks just want some assurance that their db
is still fine. Properly exposing an operation to do so hopefully makes
less likely to poke at the db directly (with eg sqlite3 command).

(cherry picked from commit 173b737)
  • Loading branch information
pmatilai authored and dmnks committed Nov 13, 2023
1 parent 4d5a3d6 commit c693340
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/man/rpmdb.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ SYNOPSIS

**rpmdb** {**\--initdb\|\--rebuilddb**}

**rpmdb** {**\--verifydb}

**rpmdb** {**\--exportdb\|\--importdb**}

DESCRIPTION
Expand All @@ -28,6 +30,8 @@ Use **\--initdb** to create a new database if one doesn\'t already exist
(existing database is not overwritten), use **\--rebuilddb** to rebuild
the database indices from the installed package headers.

**\--verifydb** performs a low-level integrity check on the database.

**\--exportdb** exports the database in header-list format, suitable
for transfporting to another host or database type.

Expand Down
4 changes: 2 additions & 2 deletions rpmdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ static struct poptOption dbOptsTable[] = {
{ "rebuilddb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_REBUILDDB,
N_("rebuild database inverted lists from installed package headers"),
NULL},
{ "verifydb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR|POPT_ARGFLAG_DOC_HIDDEN),
&mode, MODE_VERIFYDB, N_("verify database files"), NULL},
{ "verifydb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR),
&mode, MODE_VERIFYDB, N_("verify database"), NULL},
{ "salvagedb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR|POPT_ARGFLAG_DOC_HIDDEN),
&mode, MODE_SALVAGEDB, N_("salvage database"), NULL},
{ "exportdb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_EXPORTDB,
Expand Down

0 comments on commit c693340

Please sign in to comment.