[PATCH] Tell libsolv to prefer rpmdb in home directory.
authorMihai Moldovan <ionic@ionic.de>
Tue, 29 Sep 2020 16:30:16 +0000 (18:30 +0200)
committerFrédéric Pierret <frederic.pierret@qubes-os.org>
Sun, 8 Jan 2023 09:08:51 +0000 (09:08 +0000)
The rpm package on Debian is patched to always use the RPMDB in a user's home
directory. Libsolv is not patched in such a way. Since DNF is mixing librpm and
libsolv, strange situations occur.

Tell libsolv to prefer the rpmdb in the user's home directory.

Gbp-Pq: Name 0005-Tell-libsolv-to-prefer-rpmdb-in-home-directory.patch

libdnf/dnf-sack.cpp

index e62ccff41979ea963cbb7fe241ad95ba8e82cf33..b7afd12530370a4ddfbbc89c0a59191bedf74927 100644 (file)
@@ -1803,7 +1803,7 @@ dnf_sack_load_system_repo(DnfSack *sack, HyRepo a_hrepo, int flags, GError **err
     repo = repo_create(pool, HY_SYSTEM_REPO_NAME);
 
     g_debug("fetching rpmdb");
-    int flagsrpm = REPO_REUSE_REPODATA | RPM_ADD_WITH_HDRID | REPO_USE_ROOTDIR;
+    int flagsrpm = REPO_REUSE_REPODATA | RPM_ADD_WITH_HDRID | REPO_USE_ROOTDIR | RPMDB_USE_HOMEDIR;
     int rc = repo_add_rpmdb_reffp(repo, NULL, flagsrpm);
     if (!rc) {
         repoImpl->state_main = _HY_LOADED_FETCH;