From 108adfc4d10b2158d38d599430275b149ad236c5 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 21 Oct 2019 14:50:22 +0300
Subject: [PATCH] Use paths from db_ops in the backends too where possible

ndb and sqlite have control of their own paths, BDB and LMDB do things
differently and dummydb doesn't have a path at all.

URL:https://github.com/rpm-software-management/rpm/commit/108adfc4d10b2158d38d599430275b149ad236c5
Conflict: delete the contents of lib/backend/sqlite.c, because we have no sqlite database.
---
 lib/backend/ndb/glue.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/backend/ndb/glue.c b/lib/backend/ndb/glue.c
index d679ed1..03aaaa8 100644
--- a/lib/backend/ndb/glue.c
+++ b/lib/backend/ndb/glue.c
@@ -101,7 +101,7 @@ static int ndb_Open(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int flags)
     
     if (dbi->dbi_type == DBI_PRIMARY) {
 	rpmpkgdb pkgdb = 0;
-	char *path = rstrscat(NULL, dbhome, "/Packages.db", NULL);
+	char *path = rstrscat(NULL, dbhome, "/", rdb->db_ops->path, NULL);
 	rpmlog(RPMLOG_DEBUG, "opening  db index       %s mode=0x%x\n", path, rdb->db_mode);
 	rc = rpmpkgOpen(&pkgdb, path, oflags, 0666);
  	if (rc && errno == ENOENT) {
-- 
1.8.3.1

