diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-01-05 13:26:11 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-01-05 13:26:11 +0200 |
commit | 5c4135654f9d35772bea8a51c98c8020a3d20396 (patch) | |
tree | 538a256de7d3f87c00b7639a250f47aea507b45e | |
parent | b52c2d7e6d4d271347f631950ce67aab8aa2a48c (diff) | |
download | rpm-5c4135654f9d35772bea8a51c98c8020a3d20396.tar.gz rpm-5c4135654f9d35772bea8a51c98c8020a3d20396.tar.bz2 rpm-5c4135654f9d35772bea8a51c98c8020a3d20396.zip |
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...
-rw-r--r-- | lib/backend/db3.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/backend/db3.c b/lib/backend/db3.c index c3c1a6e5b..45b53632d 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); |