libsolv/usr-sqlite.patch
2020-05-25 20:54:48 +00:00

14 lines
590 B
Diff

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