From 771ddb195586c638cbfc635fa6726733532bcfd0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 3 Jun 2020 12:55:02 +0200 Subject: Allow 20 instead of 10 loops for pkgProblemResolver Especially if a lot packages have to be removed due to not to explicitly expressed conflicts the problem resolver can take a few turns to remove them all. Allowing it to try a little longer if needed seems beneficial as the worst which can happen is that we now take two times as long to present an error message to the user. --- apt-pkg/algorithms.cc | 3 ++- doc/examples/configure-index | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index c12924c5f..cba772d41 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -793,8 +793,9 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) changing a breaks c) */ bool Change = true; bool const TryFixByInstall = _config->FindB("pkgProblemResolver::FixByInstall", true); + int const MaxCounter = _config->FindI("pkgProblemResolver::MaxCounter", 20); std::vector KillList; - for (int Counter = 0; Counter != 10 && Change == true; Counter++) + for (int Counter = 0; Counter < MaxCounter && Change; ++Counter) { Change = false; for (pkgCache::Package **K = PList.get(); K != PEnd; K++) diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 497483ccc..47715a9e1 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -586,6 +586,7 @@ pkgProblemResolver::Scores AddEssential ""; }; pkgProblemResolver::FixByInstall ""; +pkgProblemResolver::MaxCounter ""; APT::FTPArchive::release { -- cgit v1.2.3-70-g09d2