summaryrefslogtreecommitdiff
path: root/apt-pkg/upgrade.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-05-06 14:21:02 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-05-20 14:18:36 +0200
commit43c71fad3a51d841132ba15a7a5930e1ee4126ed (patch)
tree669fa559ee36e4dd26804a518d4a590eca9f7bb4 /apt-pkg/upgrade.cc
parenta6f8c07f83e4e5a8155c04feab543dc0c82ed495 (diff)
edsp: add Forbid-{New-Install,Remove} and Upgrade-All
This allows to differentiate properly between 'apt-get upgrade', 'apt upgrade' and 'apt full-upgrade'.
Diffstat (limited to 'apt-pkg/upgrade.cc')
-rw-r--r--apt-pkg/upgrade.cc10
1 files changed, 7 insertions, 3 deletions
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"));