Skip to content

Commit

Permalink
DnfRepo: fix module_hotfixes keyfile priority level
Browse files Browse the repository at this point in the history
We were setting the runtime value of the knob instead of the repoconfig
value. This meant that a user wanting to override the config via
`dnf_repo_set_module_hotfixes` (which also sets the runtime value) would
have its changes clobbered.

This should fix Silverblue Rawhide rpm-ostree composes:
https://pagure.io/releng/failed-composes/issue/717
https://pagure.io/releng/failed-composes/issue/929

where we use a hack to allow rpm-ostree to install modular packages
until we fully support modules (which requires #874) and it was getting
reset because `dnf_repo_download_packages` wants to reset the repo
config from the keyfile. For more information, see discussions at:

#885

Closes: #885
Approved by: j-mracek
  • Loading branch information
jlebon authored and rh-atomic-bot committed Feb 4, 2020
1 parent 367cf8a commit 4a7ab08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdnf/dnf-repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ dnf_repo_set_keyfile_data(DnfRepo *repo, GError **error)
dnf_repo_set_cost(repo, cost);

module_hotfixes = g_key_file_get_boolean(priv->keyfile, repoId, "module_hotfixes", NULL);
dnf_repo_set_module_hotfixes(repo, module_hotfixes);
priv->repo->getConfig()->module_hotfixes().set(libdnf::Option::Priority::REPOCONFIG, module_hotfixes);

/* baseurl is optional; if missing, unset it */
baseurls = g_key_file_get_string_list(priv->keyfile, repoId, "baseurl", NULL, NULL);
Expand Down

0 comments on commit 4a7ab08

Please sign in to comment.