summaryrefslogtreecommitdiff
path: root/sqlite-rpmdb.patch
blob: ffe5eaae830069e3f264df27c6535f674fa17548 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- poldek-0.42.2/pm/rpmorg/rpm.c.orig	2020-01-25 22:59:59.000000000 +0100
+++ poldek-0.42.2/pm/rpmorg/rpm.c	2020-11-01 10:11:24.892206997 +0100
@@ -286,6 +286,10 @@
 
     pm_rpm = pm_rpm;
 
+    char *backend = rpmExpand("%{_db_backend}", NULL);
+    if (backend != NULL && strncmp(backend, "sqlite", 6) == 0) {
+        file = "rpmdb.sqlite";
+    }
     snprintf(path, sizeof(path), "%s/%s", dbpath, file);
 
     if (stat(path, &st) != 0)