summaryrefslogtreecommitdiff
path: root/apt-private/private-install.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-08-17 13:27:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-27 00:10:14 +0200
commit67caa2e6538f13ff7a0d77e98ad6c58af998376d (patch)
treed7ec492d7a54460a0d94b322911dda2b2595a514 /apt-private/private-install.cc
parent2a884c612b10b27f4be2cc6dd689bfe448d9361a (diff)
mark pkg(All|Dist)Upgrade as deprecated
The comment above their definition marks them already as such, so this is only a formalisation of the deprecation and fixes the occurances we have in our own code together with removing a magic number. Git-Dch: Ignore
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r--apt-private/private-install.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 656b97233..c172f5ee7 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -619,18 +619,14 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
if (Fix != NULL)
{
// Call the scored problem resolver
- bool resolver_fail = false;
OpTextProgress Progress(*_config);
bool const distUpgradeMode = strcmp(CmdL.FileList[0], "dist-upgrade") == 0 || strcmp(CmdL.FileList[0], "full-upgrade") == 0;
- if (UpgradeMode == 0)
- {
- if (distUpgradeMode == true)
- resolver_fail = APT::Upgrade::Upgrade(Cache, 0, &Progress);
- else
- resolver_fail = Fix->Resolve(true, &Progress);
- } else
+ bool resolver_fail = false;
+ if (distUpgradeMode == true || UpgradeMode != APT::Upgrade::ALLOW_EVERYTHING)
resolver_fail = APT::Upgrade::Upgrade(Cache, UpgradeMode, &Progress);
+ else
+ resolver_fail = Fix->Resolve(true, &Progress);
if (resolver_fail == false && Cache->BrokenCount() == 0)
return false;