From: Michael Tremer Date: Fri, 10 Jan 2025 16:31:02 +0000 (+0000) Subject: transaction: In build mode, always install the best set of packages X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b4fb689a6cbfb6879e502666c244d40673130dfd;p=people%2Fric9%2Fpakfire.git transaction: In build mode, always install the best set of packages Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/transaction.c b/src/pakfire/transaction.c index 4490421dc..3b7a11c74 100644 --- a/src/pakfire/transaction.c +++ b/src/pakfire/transaction.c @@ -328,6 +328,15 @@ static int pakfire_transaction_setup_solver(struct pakfire_transaction* transact // Automatically update when installation is requested solver_set_flag(transaction->solver, SOLVER_FLAG_INSTALL_ALSO_UPDATES, 1); +#ifdef SOLVER_FLAG_FOCUS_NEW + // By default, only update as many packages as necessary + solver_set_flag(transaction->solver, SOLVER_FLAG_FOCUS_NEW, 1); +#endif + + // In build mode, we want to install the best versions + if (pakfire_has_flag(transaction->pakfire, PAKFIRE_FLAGS_BUILD)) + solver_set_flag(transaction->solver, SOLVER_FLAG_FOCUS_BEST, 1); + // Can the solver downgrade packages? if (transaction->flags & PAKFIRE_TRANSACTION_ALLOW_DOWNGRADE) solver_set_flag(transaction->solver, SOLVER_FLAG_ALLOW_DOWNGRADE, 1);