Skip to content

Commit

Permalink
Set pool flag to fix pool_addfileprovides_queue() without filelists.xml
Browse files Browse the repository at this point in the history
Since dnf4 now also conditionally load filelists it ran into the same
problem as dnf5 here: rpm-software-management/dnf5#520

Additional details in: openSUSE/libsolv#531
  • Loading branch information
kontura committed Jun 25, 2024
1 parent 86bbb15 commit 1df6f8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libdnf/dnf-sack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ dnf_sack_init(DnfSack *sack)
DnfSackPrivate *priv = GET_PRIVATE(sack);
priv->pool = pool_create();
pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1);

// Configures the pool_addfileprovides_queue() method to only add files from primary.xml.
// This ensures the method works correctly even if filelist.xml metadata are not loaded.
// At the same time when filelist.xml are loaded libsolv is able to search them for required
// files if needed.
pool_set_flag(priv->pool, POOL_FLAG_ADDFILEPROVIDESFILTERED, 1);

priv->running_kernel_id = -1;
priv->running_kernel_fn = running_kernel;
priv->considered_uptodate = TRUE;
Expand Down

0 comments on commit 1df6f8c

Please sign in to comment.