]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-install.cc
mark pkg(All|Dist)Upgrade as deprecated
[apt.git] / apt-private / private-install.cc
index 55893bda05941e503611102b96e5cb68a7cbdf05..c172f5ee7d87645bfac646ae857de0a00ddfc977 100644 (file)
@@ -619,15 +619,14 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
       if (Fix != NULL)
       {
         // Call the scored problem resolver
+        OpTextProgress Progress(*_config);
+        bool const distUpgradeMode = strcmp(CmdL.FileList[0], "dist-upgrade") == 0 || strcmp(CmdL.FileList[0], "full-upgrade") == 0;
+
         bool resolver_fail = false;
-        if (UpgradeMode == 0)
-        {
-           if (strcmp(CmdL.FileList[0], "dist-upgrade") == 0 || strcmp(CmdL.FileList[0], "full-upgrade") == 0)
-              resolver_fail = APT::Upgrade::Upgrade(Cache, 0);
-           else
-              resolver_fail = Fix->Resolve(true);
-        } else
-           resolver_fail = APT::Upgrade::Upgrade(Cache, UpgradeMode);
+        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;