Skip to content

Commit

Permalink
core: Mark all repos as "modular hotfixes"
Browse files Browse the repository at this point in the history
This is a follow-up hack to coreos#1797 to force libdnf to let us use modular
packages as if they were regular packages until we actually support
modules correctly (coreos#1435).

A repo marked as a modular hotfix means that libdnf doesn't try to
filter out modular RPMs from the repo as it usually does.

Resolves: https://pagure.io/releng/failed-composes/issue/717
  • Loading branch information
jlebon committed Jan 8, 2020
1 parent 654ab64 commit e97b4e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
6 changes: 6 additions & 0 deletions src/libpriv/rpmostree-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,12 @@ rpmostree_context_download_metadata (RpmOstreeContext *self,
* So for now, let's tell libdnf that we do want to be able to see them. See:
* https://github.com/projectatomic/rpm-ostree/issues/1435 */
dnf_sack_set_module_excludes (dnf_context_get_sack (self->dnfctx), NULL);
/* And also mark all repos as hotfix repos so that we can indiscriminately cherry-pick
* from modular repos and non-modular repos alike. */
g_autoptr(GPtrArray) repos =
rpmostree_get_enabled_rpmmd_repos (self->dnfctx, DNF_REPO_ENABLED_PACKAGES);
for (guint i = 0; i < repos->len; i++)
dnf_repo_set_module_hotfixes (repos->pdata[i], TRUE);

return TRUE;
}
Expand Down
15 changes: 0 additions & 15 deletions tests/compose/test-basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,6 @@ echo gpgcheck=0 >> yumrepo.repo
ln "$PWD/yumrepo.repo" config/yumrepo.repo
treefile_append "packages" '["foobar"]'

###
# MAJOR HACK ALERT; drop modular pkgs because libdnf in the non-unified path
# wants the modulemd available in the rpmmd, which neither our cache repo nor
# pool have
treefile_pyedit "
tf['packages'].remove('afterburn')
tf['packages'].remove('afterburn-dracut')
tf['packages'].remove('fedora-coreos-pinger')
tf['packages'].remove('sssd')
"
# have mercy
echo 'exclude=libnghttp2' >> config/cache.repo
build_rpm fake-libnghttp2 version 1.40.0 provides "libnghttp2.so.14()(64bit)"
###

treefile_pyedit "tf['add-commit-metadata']['foobar'] = 'bazboo'"
treefile_pyedit "tf['add-commit-metadata']['overrideme'] = 'old var'"

Expand Down

0 comments on commit e97b4e9

Please sign in to comment.