Skip to content

Commit

Permalink
Allow passing additional_data to report_not_found
Browse files Browse the repository at this point in the history
  • Loading branch information
kontura committed May 31, 2024
1 parent c1cc32c commit e7ec9d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions libdnf5/base/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ GoalProblem Transaction::Impl::report_not_found(
GoalAction action,
const std::string & pkg_spec,
const GoalJobSettings & settings,
libdnf5::Logger::Level log_level) {
libdnf5::Logger::Level log_level,
std::set<std::string> additional_data) {
auto sack = base->get_rpm_package_sack();
rpm::PackageQuery query(base, rpm::PackageQuery::ExcludeFlags::IGNORE_EXCLUDES);
if (action == GoalAction::REMOVE) {
Expand All @@ -255,7 +256,7 @@ GoalProblem Transaction::Impl::report_not_found(
settings,
libdnf5::transaction::TransactionItemType::PACKAGE,
pkg_spec,
{},
additional_data,
log_level);
if (settings.get_report_hint()) {
rpm::PackageQuery hints(base);
Expand Down Expand Up @@ -309,7 +310,7 @@ GoalProblem Transaction::Impl::report_not_found(
settings,
libdnf5::transaction::TransactionItemType::PACKAGE,
pkg_spec,
{},
additional_data,
log_level);
return GoalProblem::ONLY_SRC;
}
Expand All @@ -321,7 +322,7 @@ GoalProblem Transaction::Impl::report_not_found(
settings,
libdnf5::transaction::TransactionItemType::PACKAGE,
pkg_spec,
{},
additional_data,
log_level);
return GoalProblem::EXCLUDED_VERSIONLOCK;
} else {
Expand All @@ -332,7 +333,7 @@ GoalProblem Transaction::Impl::report_not_found(
settings,
libdnf5::transaction::TransactionItemType::PACKAGE,
pkg_spec,
{},
additional_data,
log_level);
return GoalProblem::EXCLUDED;
}
Expand Down
3 changes: 2 additions & 1 deletion libdnf5/base/transaction_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class Transaction::Impl {
GoalAction action,
const std::string & pkg_spec,
const GoalJobSettings & settings,
libdnf5::Logger::Level log_level);
libdnf5::Logger::Level log_level,
std::set<std::string> additional_data = {});
void add_resolve_log(
GoalAction action,
GoalProblem problem,
Expand Down

0 comments on commit e7ec9d3

Please sign in to comment.