diff options
author | Michael Vogt <mvo@debian.org> | 2014-09-29 09:58:38 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-09-29 09:58:38 +0200 |
commit | 4c333a25a88b1afac2ed50bf1b9af61dc5b09343 (patch) | |
tree | d4b90a7bc46e9da364efb74365a0af604b38e424 /apt-private/private-install.cc | |
parent | bca84917c326fa3158e120147c8aecebe0789b47 (diff) | |
parent | 6eb377fb9fba6b7f17f635143e9201f0d62a50fb (diff) |
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Conflicts:
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
methods/gpgv.cc
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r-- | apt-private/private-install.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 55893bda0..86ba52857 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -560,9 +560,9 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache, std::list<APT::VersionSet::Modifier> mods; mods.push_back(APT::VersionSet::Modifier(MOD_INSTALL, "+", - APT::VersionSet::Modifier::POSTFIX, APT::VersionSet::CANDIDATE)); + APT::VersionSet::Modifier::POSTFIX, APT::CacheSetHelper::CANDIDATE)); mods.push_back(APT::VersionSet::Modifier(MOD_REMOVE, "-", - APT::VersionSet::Modifier::POSTFIX, APT::VersionSet::NEWEST)); + APT::VersionSet::Modifier::POSTFIX, APT::CacheSetHelper::NEWEST)); CacheSetHelperAPTGet helper(c0out); verset = APT::VersionSet::GroupedFromCommandLine(Cache, CmdL.FileList + 1, mods, fallback, helper); @@ -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; |