From 961ced7a611000b8a3d522ddc92c6230b4367e1f Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 16 Sep 2009 12:08:58 +0300 Subject: [PATCH] Eliminate long since unused db subfile from bdb code --- lib/backend/db3.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/lib/backend/db3.c b/lib/backend/db3.c index b7f1102..d9f0c7c 100644 --- a/lib/backend/db3.c +++ b/lib/backend/db3.c @@ -572,7 +572,6 @@ static int db3close(dbiIndex dbi, unsigned int flags) const char * home; char * dbhome; const char * dbfile; - const char * dbsubfile; DB * db = dbi->dbi_db; int _printit; int rc = 0, xx; @@ -590,15 +589,8 @@ static int db3close(dbiIndex dbi, unsigned int flags) dbhome = rpmGenPath(root, home, NULL); if (dbi->dbi_temporary) { dbfile = NULL; - dbsubfile = NULL; } else { -#ifdef HACK /* XXX necessary to support dbsubfile */ - dbfile = (dbi->dbi_file ? dbi->dbi_file : db3basename); - dbsubfile = (dbi->dbi_subfile ? dbi->dbi_subfile : rpmTagGetName(dbi->dbi_rpmtag)); -#else dbfile = (dbi->dbi_file ? dbi->dbi_file : rpmTagGetName(dbi->dbi_rpmtag)); - dbsubfile = NULL; -#endif } if (db) { @@ -698,7 +690,6 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) const char * home; char * dbhome; const char * dbfile; - const char * dbsubfile; dbiIndex dbi = NULL; int rc = 0; int xx; @@ -730,15 +721,8 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) dbhome = rpmGenPath(root, home, NULL); if (dbi->dbi_temporary) { dbfile = NULL; - dbsubfile = NULL; } else { -#ifdef HACK /* XXX necessary to support dbsubfile */ - dbfile = (dbi->dbi_file ? dbi->dbi_file : db3basename); - dbsubfile = (dbi->dbi_subfile ? dbi->dbi_subfile : rpmTagGetName(dbi->dbi_rpmtag)); -#else dbfile = (dbi->dbi_file ? dbi->dbi_file : rpmTagGetName(dbi->dbi_rpmtag)); - dbsubfile = NULL; -#endif } oflags = (dbi->dbi_oeflags | dbi->dbi_oflags); @@ -1008,15 +992,9 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) const char * dbpath; fullpath = rpmGetPath(dbhome, "/", dbfile ? dbfile : "", NULL); -#ifdef HACK /* XXX necessary to support dbsubfile */ - dbpath = (!dbi->dbi_use_dbenv && !dbi->dbi_temporary) - ? fullpath : dbfile; -#else - dbpath = (!dbi->dbi_temporary) - ? fullpath : dbfile; -#endif + dbpath = (!dbi->dbi_temporary) ? fullpath : dbfile; - rc = (db->open)(db, txnid, dbpath, dbsubfile, + rc = (db->open)(db, txnid, dbpath, NULL, dbi->dbi_type, oflags, dbi->dbi_perms); if (rc == 0 && dbi->dbi_type == DB_UNKNOWN) { -- 2.7.4