summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-install.cc12
-rw-r--r--apt-private/private-upgrade.cc2
2 files changed, 5 insertions, 9 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;
diff --git a/apt-private/private-upgrade.cc b/apt-private/private-upgrade.cc
index 2a6dcc153..d13a6af49 100644
--- a/apt-private/private-upgrade.cc
+++ b/apt-private/private-upgrade.cc
@@ -33,7 +33,7 @@ static bool UpgradeHelper(CommandLine &CmdL, int UpgradeFlags)
/* Intelligent upgrader that will install and remove packages at will */
bool DoDistUpgrade(CommandLine &CmdL)
{
- return UpgradeHelper(CmdL, 0);
+ return UpgradeHelper(CmdL, APT::Upgrade::ALLOW_EVERYTHING);
}
/*}}}*/
bool DoUpgrade(CommandLine &CmdL) /*{{{*/