Skip to content

Commit

Permalink
Use focusbest: prefer latest deps versions over smaller transactions
Browse files Browse the repository at this point in the history
This requires `libsolv-0.7.25` because it contains a fix for weak deps
issue that manifested when `focusbest` was used.
  • Loading branch information
kontura authored and j-mracek committed Oct 18, 2023
1 parent 8b515b7 commit 2d9df1c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dnf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Provides: dnf5-command(makecache)

%global libmodulemd_version 2.5.0
%global librepo_version 1.15.0
%global libsolv_version 0.7.21
%global libsolv_version 0.7.25
%global sqlite_version 3.35.0
%global swig_version 4
%global zchunk_version 0.9.11
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pkg_check_modules(LIBMODULEMD REQUIRED modulemd-2.0>=2.11.2)
list(APPEND LIBDNF5_PC_REQUIRES "${LIBMODULEMD_MODULE_NAME}")
target_link_libraries(libdnf5 PRIVATE ${LIBMODULEMD_LIBRARIES})

pkg_check_modules(LIBSOLV REQUIRED libsolv>=0.7.21)
pkg_check_modules(LIBSOLV REQUIRED libsolv>=0.7.25)
list(APPEND LIBDNF5_PC_REQUIRES "${LIBSOLV_MODULE_NAME}")
target_link_libraries(libdnf5 PRIVATE ${LIBSOLV_LIBRARIES})

Expand Down
3 changes: 3 additions & 0 deletions libdnf5/rpm/solv/goal_private.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,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;
}
Expand Down

0 comments on commit 2d9df1c

Please sign in to comment.