X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/05f64ca2e483709faa6bc69dfa79129d2d4c679e..0cfec3ab589c6309bf284438d2148c7742cdaf10:/apt-pkg/upgrade.cc diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc index 6c8721da8..8ba48e786 100644 --- a/apt-pkg/upgrade.cc +++ b/apt-pkg/upgrade.cc @@ -28,7 +28,7 @@ static bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress) { std::string const solver = _config->Find("APT::Solver", "internal"); if (solver != "internal") - return EDSP::ResolveExternal(solver.c_str(), Cache, false, true, false, Progress); + return EDSP::ResolveExternal(solver.c_str(), Cache, EDSP::Request::UPGRADE_ALL, Progress); if (Progress != NULL) Progress->OverallProgress(0, 100, 1, _("Calculating upgrade")); @@ -130,18 +130,16 @@ static bool pkgAllUpgradeNoNewPackages(pkgDepCache &Cache, OpProgress * const Pr { std::string const solver = _config->Find("APT::Solver", "internal"); if (solver != "internal") - return EDSP::ResolveExternal(solver.c_str(), Cache, true, false, false, Progress); + return EDSP::ResolveExternal(solver.c_str(), Cache, + EDSP::Request::UPGRADE_ALL | EDSP::Request::FORBID_NEW_INSTALL | EDSP::Request::FORBID_REMOVE, + Progress); if (Progress != NULL) Progress->OverallProgress(0, 100, 1, _("Calculating upgrade")); pkgDepCache::ActionGroup group(Cache); - pkgProblemResolver Fix(&Cache); - if (Cache.BrokenCount() != 0) - return false; - // Upgrade all installed packages for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { @@ -176,18 +174,16 @@ static bool pkgAllUpgradeWithNewPackages(pkgDepCache &Cache, OpProgress * const { std::string const solver = _config->Find("APT::Solver", "internal"); if (solver != "internal") - return EDSP::ResolveExternal(solver.c_str(), Cache, true, false, false, Progress); + return EDSP::ResolveExternal(solver.c_str(), Cache, + EDSP::Request::UPGRADE_ALL | EDSP::Request::FORBID_REMOVE, + Progress); if (Progress != NULL) Progress->OverallProgress(0, 100, 1, _("Calculating upgrade")); pkgDepCache::ActionGroup group(Cache); - pkgProblemResolver Fix(&Cache); - if (Cache.BrokenCount() != 0) - return false; - // provide the initial set of stuff we want to upgrade by marking // all upgradable packages for upgrade for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) @@ -288,12 +284,6 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) } /*}}}*/ // APT::Upgrade::Upgrade - Upgrade using a specific strategy /*{{{*/ -#if APT_PKG_ABI < 413 -bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode) -{ - return Upgrade(Cache, mode, NULL); -} -#endif bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Progress) { APT_IGNORE_DEPRECATED_PUSH