summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2019-10-17 12:43:20 +0300
committerPanu Matilainen <pmatilai@redhat.com>2019-11-18 12:46:29 +0200
commitc67f3b133abf180de356d63c8bc489468b8cbf6b (patch)
tree3940350efc084d6ded6ce183f1cfbe2fade67c73
parent5e90643e4370524897ba5666c98c41e8dd96da82 (diff)
downloadrpm-c67f3b133abf180de356d63c8bc489468b8cbf6b.tar.gz
Don't report unimplemented db ctrl and verify ops as errors
ndb doesn't implement a specific verify option, but that doesn't mean the data within should be considered invalid. This causes ndb to fail the test-suite on "rpmdb --rebuilddb and verify empty database" for no good reason. Similar arguments could be made for dummydb although it matters much less there. (cherry picked from commit 7ba4b9bdcfc84e7e4740ede0c834581d3be1d865)
-rw-r--r--lib/backend/dummydb.c4
-rw-r--r--lib/backend/ndb/glue.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/backend/dummydb.c b/lib/backend/dummydb.c
index 961d64111..dbd0d9b44 100644
--- a/lib/backend/dummydb.c
+++ b/lib/backend/dummydb.c
@@ -22,7 +22,7 @@ static int dummydb_Open(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int fla
static int dummydb_Verify(dbiIndex dbi, unsigned int flags)
{
- return 1;
+ return 0;
}
static void dummydb_SetFSync(rpmdb rdb, int enable)
@@ -31,7 +31,7 @@ static void dummydb_SetFSync(rpmdb rdb, int enable)
static int dummydb_Ctrl(rpmdb rdb, dbCtrlOp ctrl)
{
- return 1;
+ return 0;
}
static dbiCursor dummydb_CursorInit(dbiIndex dbi, unsigned int flags)
diff --git a/lib/backend/ndb/glue.c b/lib/backend/ndb/glue.c
index 7778ed774..36c214dc6 100644
--- a/lib/backend/ndb/glue.c
+++ b/lib/backend/ndb/glue.c
@@ -179,7 +179,7 @@ static int ndb_Open(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int flags)
static int ndb_Verify(dbiIndex dbi, unsigned int flags)
{
- return 1;
+ return 0;
}
static void ndb_SetFSync(rpmdb rdb, int enable)