Skip to content

Commit

Permalink
Apply hotfix repository filtering only when it is needed
Browse files Browse the repository at this point in the history
The original code resulted in:

GLib-CRITICAL **: 09:37:58.965: g_strv_length: assertion 'str_array != NULL' failed
  • Loading branch information
j-mracek authored and kontura committed Mar 11, 2021
1 parent 68dc5d5 commit cbacc22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libdnf/dnf-sack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,9 @@ setModuleExcludes(DnfSack *sack, const char ** hotfixRepos,
libdnf::Query keepPackages{sack};
const char *keepRepo[] = {HY_CMDLINE_REPO_NAME, HY_SYSTEM_REPO_NAME, nullptr};
keepPackages.addFilter(HY_PKG_REPONAME, HY_NEQ, keepRepo);
keepPackages.addFilter(HY_PKG_REPONAME, HY_NEQ, hotfixRepos);
if (hotfixRepos != nullptr) {
keepPackages.addFilter(HY_PKG_REPONAME, HY_NEQ, hotfixRepos);
}

libdnf::Query includeQuery{sack};
libdnf::Query excludeQuery{keepPackages};
Expand Down

0 comments on commit cbacc22

Please sign in to comment.