From 5c4135654f9d35772bea8a51c98c8020a3d20396 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 5 Jan 2011 13:26:11 +0200 Subject: [PATCH] Tweak up BDB flags to avoid breakage from --verifydb - db->verify() has semantics unlike anything else in BDB and does strange things to a shared environment (causes persistent ENOMEM failures in the environment after a couple of attemps). Use a private environment and no CDB when verifying. - The whole --verifydb is rather useless, perhaps the better option would be deleting the lot... --- lib/backend/db3.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/backend/db3.c b/lib/backend/db3.c index c3c1a6e..45b5363 100644 --- a/lib/backend/db3.c +++ b/lib/backend/db3.c @@ -122,6 +122,11 @@ static int db_init(rpmdb rdb, const char * dbhome) /* By no means necessary but speeds things up a bit */ if (rdb->db_flags & RPMDB_FLAG_REBUILD) eflags &= ~DB_INIT_CDB; + /* XXX Something bizarre with verify... use private environment, no cdb */ + if (rdb->db_flags & RPMDB_FLAG_VERIFYONLY) { + eflags |= DB_PRIVATE; + eflags &= ~DB_INIT_CDB; + } rc = db_env_create(&dbenv, 0); rc = dbapi_err(rdb, "db_env_create", rc, _debug); -- 2.7.4