static bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
+ auto const ret = EDSP::ResolveExternal(solver.c_str(), Cache, EDSP::Request::UPGRADE_ALL, Progress);
if (solver != "internal")
- return EDSP::ResolveExternal(solver.c_str(), Cache, false, true, false, Progress);
+ return ret;
if (Progress != NULL)
Progress->OverallProgress(0, 100, 1, _("Calculating upgrade"));
}
}
- bool const success = Fix.Resolve(false, Progress);
+ bool const success = Fix.ResolveInternal(false);
if (Progress != NULL)
Progress->Done();
return success;
static bool pkgAllUpgradeNoNewPackages(pkgDepCache &Cache, 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;
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)
{
Progress->Progress(50);
// resolve remaining issues via keep
- bool const success = Fix.ResolveByKeep(Progress);
+ bool const success = Fix.ResolveByKeepInternal();
if (Progress != NULL)
Progress->Done();
return success;
static bool pkgAllUpgradeWithNewPackages(pkgDepCache &Cache, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
+ constexpr auto flags = EDSP::Request::UPGRADE_ALL | 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;
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)
Progress->Progress(60);
// resolve remaining issues via keep
- bool const success = Fix.ResolveByKeep(Progress);
+ bool const success = Fix.ResolveByKeepInternal();
if (Progress != NULL)
Progress->Done();
return success;
}
/*}}}*/
// 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