rpm/rpm-4.7.1-chroot-env-paths.patch

29 lines
870 B
Diff
Raw Normal View History

diff --git a/lib/backend/db3.c b/lib/backend/db3.c
index 9f0f941..b0b2a86 100644
--- a/lib/backend/db3.c
+++ b/lib/backend/db3.c
@@ -1015,17 +1015,12 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
}
if (rc == 0) {
- char * fullpath;
- 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
+ char * fullpath = NULL;
+ const char * dbpath = dbfile;
+ if (!dbi->dbi_use_dbenv && !dbi->dbi_temporary) {
+ fullpath = rpmGetPath(dbhome, "/", dbfile, NULL);
+ dbpath = fullpath;
+ }
rc = (db->open)(db, txnid, dbpath, dbsubfile,
dbi->dbi_type, oflags, dbi->dbi_perms);