]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.cc
allow methods to be disabled and redirected via config
[apt.git] / apt-pkg / algorithms.cc
index fbc809ed0ece88c22387785e4c7b13f024180435..b173979c3a4f5eaf25dcef28c488de9e0a8ddb1f 100644 (file)
@@ -636,8 +636,9 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg)
 bool pkgProblemResolver::Resolve(bool BrokenFix, OpProgress * const Progress)
 {
    std::string const solver = _config->Find("APT::Solver", "internal");
+   auto const ret = EDSP::ResolveExternal(solver.c_str(), Cache, 0, Progress);
    if (solver != "internal")
-      return EDSP::ResolveExternal(solver.c_str(), Cache, false, false, false, Progress);
+      return ret;
    return ResolveInternal(BrokenFix);
 }
                                                                        /*}}}*/
@@ -1133,8 +1134,10 @@ bool pkgProblemResolver::InstOrNewPolicyBroken(pkgCache::PkgIterator I)
 bool pkgProblemResolver::ResolveByKeep(OpProgress * const Progress)
 {
    std::string const solver = _config->Find("APT::Solver", "internal");
+   constexpr auto flags = EDSP::Request::UPGRADE_ALL | EDSP::Request::FORBID_NEW_INSTALL | EDSP::Request::FORBID_REMOVE;
+   auto const ret = EDSP::ResolveExternal(solver.c_str(), Cache, flags, Progress);
    if (solver != "internal")
-      return EDSP::ResolveExternal(solver.c_str(), Cache, true, false, false, Progress);
+      return ret;
    return ResolveByKeepInternal();
 }
                                                                        /*}}}*/