From c6160aa95a361d9ac498e1586b9227e55753314d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: May 25 2020 20:54:48 +0000 Subject: Apply https://github.com/openSUSE/libsolv/pull/386 --- diff --git a/libsolv.spec b/libsolv.spec index 6de5b4c..ce9f269 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -21,13 +21,17 @@ Name: lib%{libname} Version: 0.7.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Package dependency solver License: BSD URL: https://github.com/openSUSE/libsolv Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +# https://github.com/openSUSE/libsolv/pull/386 +# https://bugzilla.redhat.com/show_bug.cgi?id=1838691 +Patch0: usr-sqlite.patch + BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: ninja-build @@ -269,6 +273,10 @@ Python 3 version. %endif %changelog +* Mon May 25 2020 Colin Walters - 0.7.12-3 +- Apply https://github.com/openSUSE/libsolv/pull/386 + to fix https://bugzilla.redhat.com/show_bug.cgi?id=1838691 + * Mon May 25 2020 Miro HronĨok - 0.7.12-2 - Rebuilt for Python 3.9 diff --git a/usr-sqlite.patch b/usr-sqlite.patch new file mode 100644 index 0000000..ceedb1b --- /dev/null +++ b/usr-sqlite.patch @@ -0,0 +1,13 @@ +diff --git a/ext/repo_rpmdb_librpm.h b/ext/repo_rpmdb_librpm.h +index 34e6698..35a46fa 100644 +--- a/ext/repo_rpmdb_librpm.h ++++ b/ext/repo_rpmdb_librpm.h +@@ -46,7 +46,7 @@ static void + detect_dbpath(struct rpmdbstate *state) + { + state->dbpath = access_rootdir(state, "/var/lib/rpm", W_OK) == -1 +- && access_rootdir(state, "/usr/share/rpm/Packages", R_OK) == 0 ++ && (access_rootdir(state, "/usr/share/rpm/Packages", R_OK) == 0 || access_rootdir(state, "/usr/share/rpm/rpmdb.sqlite", R_OK) == 0) + ? "/usr/share/rpm" : "/var/lib/rpm"; + } +