[packages/poldek] - teach poldek about rpmdb in sqlite format

baggins baggins at pld-linux.org
Sun Nov 1 10:31:13 CET 2020


commit cafb63cb964647aba1f6c2de3a4bd5968439ddc5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Nov 1 10:30:43 2020 +0100

    - teach poldek about rpmdb in sqlite format

 poldek.spec        |  2 ++
 sqlite-rpmdb.patch | 13 +++++++++++++
 2 files changed, 15 insertions(+)
---
diff --git a/poldek.spec b/poldek.spec
index 9db2732..7e812ca 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -60,6 +60,7 @@ Patch5:		%{name}-multiarch-x32.patch
 Patch6:		rpm-4.15.patch
 Patch7:		db-index-format.patch
 Patch8:		rpm4-uname-deps.patch
+Patch9:		sqlite-rpmdb.patch
 URL:		http://poldek.pld-linux.org/
 BuildRequires:	%{db_pkg}-devel >= %{ver_db}
 BuildRequires:	autoconf >= 2.63
@@ -242,6 +243,7 @@ Moduły języka Python dla poldka.
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 %{__rm} doc/poldek.info
 %{__rm} m4/libtool.m4 m4/lt*.m4
diff --git a/sqlite-rpmdb.patch b/sqlite-rpmdb.patch
new file mode 100644
index 0000000..ffe5eaa
--- /dev/null
+++ b/sqlite-rpmdb.patch
@@ -0,0 +1,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)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/cafb63cb964647aba1f6c2de3a4bd5968439ddc5



More information about the pld-cvs-commit mailing list