From f1ec7e235e047681d5e197bc96cc687238978d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Mon, 7 Aug 2023 09:25:32 +0200 Subject: [PATCH] Use focusbest: prefer latest deps versions over smaller transactions --- libdnf5/rpm/solv/goal_private.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libdnf5/rpm/solv/goal_private.cpp b/libdnf5/rpm/solv/goal_private.cpp index 6573c9bae4..c6cc2eb08c 100644 --- a/libdnf5/rpm/solv/goal_private.cpp +++ b/libdnf5/rpm/solv/goal_private.cpp @@ -376,6 +376,9 @@ libdnf5::GoalProblem GoalPrivate::resolve() { libsolv_solver.set_flag(SOLVER_FLAG_ALLOW_VENDORCHANGE, vendor_change); libsolv_solver.set_flag(SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE, vendor_change); + // Ensure the solver tries to use the latest versions of dependencies, even if it results in a bigger transaction + libsolv_solver.set_flag(SOLVER_FLAG_FOCUS_BEST, 1); + if (libsolv_solver.solve(job)) { return libdnf5::GoalProblem::SOLVER_ERROR; }