diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-04-08 16:15:16 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-04-08 16:15:16 +0300 |
commit | 34b57de830dd5a600cefa1d2269626f744b642a0 (patch) | |
tree | 8fb1f7048708249b0f4645e2e0a1762eb3c4c914 /lib | |
parent | 4e51e58c2376e4f649db5118b137a77a71a0d8a7 (diff) | |
download | rpm-34b57de830dd5a600cefa1d2269626f744b642a0.tar.gz rpm-34b57de830dd5a600cefa1d2269626f744b642a0.tar.bz2 rpm-34b57de830dd5a600cefa1d2269626f744b642a0.zip |
Eliminate DB_JOINENV usage and config option
- DB_JOINENV is a no-op since BDB >= 4.4
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backend/db3.c | 8 | ||||
-rw-r--r-- | lib/backend/dbconfig.c | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/lib/backend/db3.c b/lib/backend/db3.c index 788ab7eec..133c11e37 100644 --- a/lib/backend/db3.c +++ b/lib/backend/db3.c @@ -98,7 +98,6 @@ static int db_init(dbiIndex dbi, const char * dbhome, DB_ENV ** dbenvp) return 1; eflags = (dbi->dbi_oeflags | dbi->dbi_eflags); - if (eflags & DB_JOINENV) eflags &= DB_JOINENV; { char *fstr = prDbiOpenFlags(eflags, 1); rpmlog(RPMLOG_DEBUG, "opening db environment %s %s\n", dbhome, fstr); @@ -475,9 +474,8 @@ int dbiOpen(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) /* ... but DBENV->open might still need DB_CREATE ... */ if (dbi->dbi_eflags & DB_PRIVATE) { - dbi->dbi_eflags &= ~DB_JOINENV; + /* ... nothing ... */ } else { - dbi->dbi_eflags |= DB_JOINENV; dbi->dbi_oeflags &= ~DB_CREATE; /* ... but, unless DB_PRIVATE is used, skip DBENV. */ dbi->dbi_use_dbenv = 0; @@ -494,13 +492,11 @@ int dbiOpen(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) if (access(dbf, F_OK) == -1) { /* ... non-existent (or unwritable) DBENV, will create ... */ dbi->dbi_oeflags |= DB_CREATE; - dbi->dbi_eflags &= ~DB_JOINENV; } else { /* ... pre-existent (or bogus) DBENV, will join ... */ if (dbi->dbi_eflags & DB_PRIVATE) { - dbi->dbi_eflags &= ~DB_JOINENV; + /* ... nothing ... */ } else { - dbi->dbi_eflags |= DB_JOINENV; dbi->dbi_oeflags &= ~DB_CREATE; } } diff --git a/lib/backend/dbconfig.c b/lib/backend/dbconfig.c index bfde9ab50..7667e53e8 100644 --- a/lib/backend/dbconfig.c +++ b/lib/backend/dbconfig.c @@ -34,8 +34,6 @@ static const struct poptOption rdbOptions[] = { NULL, NULL }, { "txn", 0,POPT_BIT_SET, &staticdbi.dbi_eflags, DB_INIT_TXN, NULL, NULL }, - { "joinenv", 0,POPT_BIT_SET, &staticdbi.dbi_eflags, DB_JOINENV, - NULL, NULL }, { "recover", 0,POPT_BIT_SET, &staticdbi.dbi_eflags, DB_RECOVER, NULL, NULL }, { "recover_fatal", 0,POPT_BIT_SET, &staticdbi.dbi_eflags, DB_RECOVER_FATAL, @@ -244,7 +242,7 @@ dbiIndex dbiNew(rpmdb rpmdb, rpmTag rpmtag) /* XXX FIXME: These all are environment, not per-dbi configuration */ dbi->dbi_use_dbenv = 1; - dbi->dbi_eflags |= (DB_INIT_MPOOL|DB_JOINENV); + dbi->dbi_eflags |= (DB_INIT_MPOOL); /* Throw in some defaults if configuration didn't set any */ if (!dbi->dbi_mmapsize) dbi->dbi_mmapsize = 16 * 1024 * 1024; if (!dbi->dbi_cachesize) dbi->dbi_cachesize = 1 * 1024 * 1024; |