From 43c71fad3a51d841132ba15a7a5930e1ee4126ed Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 6 May 2016 14:21:02 +0200 Subject: edsp: add Forbid-{New-Install,Remove} and Upgrade-All This allows to differentiate properly between 'apt-get upgrade', 'apt upgrade' and 'apt full-upgrade'. --- apt-pkg/upgrade.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'apt-pkg/upgrade.cc') diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc index 06707847e..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,7 +130,9 @@ 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")); @@ -172,7 +174,9 @@ 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")); -- cgit v1.2.3