This commit is contained in:
Colin Walters 2020-05-25 20:54:24 +00:00
parent df18f9fe03
commit c6160aa95a
2 changed files with 22 additions and 1 deletions

View File

@ -21,13 +21,17 @@
Name: lib%{libname} Name: lib%{libname}
Version: 0.7.12 Version: 0.7.12
Release: 2%{?dist} Release: 3%{?dist}
Summary: Package dependency solver Summary: Package dependency solver
License: BSD License: BSD
URL: https://github.com/openSUSE/libsolv URL: https://github.com/openSUSE/libsolv
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz 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: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: ninja-build BuildRequires: ninja-build
@ -269,6 +273,10 @@ Python 3 version.
%endif %endif
%changelog %changelog
* Mon May 25 2020 Colin Walters <walters@verbum.org> - 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 <mhroncok@redhat.com> - 0.7.12-2 * Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.12-2
- Rebuilt for Python 3.9 - Rebuilt for Python 3.9

13
usr-sqlite.patch Normal file
View File

@ -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";
}