Goal::Impl::add_specs_to_goal: Skip processing of empty query in *ALL*
The actions UPGRADE_ALL, UPGRADE_ALL_MINIMAL, and DISTRO_SYNC_ALL unnecessarily processed an empty queries, creating an empty IdQueue and passing it to the functions `rpm_goal.add_upgrade` and `rpm_goal.add_distro_sync`.
This commit is contained in:
parent
fff1ee6c09
commit
9a5bd317e6
|
@ -612,6 +612,10 @@ GoalProblem Goal::Impl::add_specs_to_goal(base::Transaction & transaction) {
|
|||
}
|
||||
}
|
||||
|
||||
if (query.empty()) {
|
||||
return GoalProblem::NO_PROBLEM;
|
||||
}
|
||||
|
||||
// Make the smallest possible upgrade
|
||||
if (action == GoalAction::UPGRADE_ALL_MINIMAL) {
|
||||
query.filter_earliest_evr();
|
||||
|
@ -637,6 +641,10 @@ GoalProblem Goal::Impl::add_specs_to_goal(base::Transaction & transaction) {
|
|||
query.filter_repo_id(settings.get_to_repo_ids(), sack::QueryCmp::GLOB);
|
||||
}
|
||||
|
||||
if (query.empty()) {
|
||||
return GoalProblem::NO_PROBLEM;
|
||||
}
|
||||
|
||||
libdnf5::solv::IdQueue upgrade_ids;
|
||||
for (auto package_id : *query.p_impl) {
|
||||
upgrade_ids.push_back(package_id);
|
||||
|
|
Loading…
Reference in New Issue