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 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg') 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++) -- cgit v1.2.3