summaryrefslogtreecommitdiff
path: root/lib/backend
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-03-31 01:55:06 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-03-31 01:55:06 +0300
commit08cdca32577a9521aa5e4f06bb6754d1840e9675 (patch)
tree76afe980389405cdb9e302ee36a0611087757f1f /lib/backend
parent025886592e2660803b35054ab6aec293834d65d8 (diff)
downloadlibrpm-tizen-08cdca32577a9521aa5e4f06bb6754d1840e9675.tar.gz
librpm-tizen-08cdca32577a9521aa5e4f06bb6754d1840e9675.tar.bz2
librpm-tizen-08cdca32577a9521aa5e4f06bb6754d1840e9675.zip
Remove "truncate" BDB config option
- Truncate is so dangerous that dbiOpenDB() discarded it even if set in configuration. How useful is that?
Diffstat (limited to 'lib/backend')
-rw-r--r--lib/backend/db3.c4
-rw-r--r--lib/backend/dbconfig.c2
2 files changed, 0 insertions, 6 deletions
diff --git a/lib/backend/db3.c b/lib/backend/db3.c
index 05d8b5833..29eb34583 100644
--- a/lib/backend/db3.c
+++ b/lib/backend/db3.c
@@ -501,7 +501,6 @@ int dbiOpenDB(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
return 1;
oflags = (dbi->dbi_oeflags | dbi->dbi_oflags);
- oflags &= ~DB_TRUNCATE; /* XXX this is dangerous */
#if 0 /* XXX rpmdb: illegal flag combination specified to DB->open */
if ( dbi->dbi_mode & O_EXCL) oflags |= DB_EXCL;
@@ -515,9 +514,6 @@ int dbiOpenDB(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
oflags |= DB_CREATE;
dbi->dbi_oeflags |= DB_CREATE;
}
-#ifdef DANGEROUS
- if ( dbi->dbi_mode & O_TRUNC) oflags |= DB_TRUNCATE;
-#endif
/*
* Avoid incompatible DB_CREATE/DB_RDONLY flags on DBENV->open.
diff --git a/lib/backend/dbconfig.c b/lib/backend/dbconfig.c
index 9a788f9c5..474d5aecb 100644
--- a/lib/backend/dbconfig.c
+++ b/lib/backend/dbconfig.c
@@ -64,8 +64,6 @@ static const struct poptOption rdbOptions[] = {
NULL, NULL },
{ "rdonly", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_RDONLY,
NULL, NULL },
- { "truncate", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_TRUNCATE,
- NULL, NULL },
{ "fcntl_locking",0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_FCNTL_LOCKING,
NULL, NULL },