From 4887aa88444bdedba4a5d05c5c17075a80bc090a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Thu, 25 Jul 2024 12:40:14 +0200 Subject: [PATCH] replay: Allow up/down-grade if NA is already installed This makes a difference if `--ignore-installed` is set and the package is installed in a different version -> it upgrades/downgrades the package to the requested version. This matches dnf4 behavior. --- libdnf5/base/goal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libdnf5/base/goal.cpp b/libdnf5/base/goal.cpp index 5a3067d7c..5cda9b8d1 100644 --- a/libdnf5/base/goal.cpp +++ b/libdnf5/base/goal.cpp @@ -888,7 +888,9 @@ GoalProblem Goal::Impl::add_replay_to_goal( package_replay.nevra, query_to_vec_of_nevra_str(query_na), log_level); - continue; + if (problem == GoalProblem::ALREADY_INSTALLED) { + continue; + } } } }