summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-06-03 12:55:02 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-06-03 12:55:02 +0200
commit771ddb195586c638cbfc635fa6726733532bcfd0 (patch)
tree1fd6725ed4c2973d4e42aabb2af9d9161e0e5022 /apt-pkg/algorithms.cc
parent8218c642342e431d7e69831bd1a6741b40345bf1 (diff)
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.
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc3
1 files changed, 2 insertions, 1 deletions
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<PackageKill> 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++)