diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-08-17 13:27:59 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-09-27 00:10:14 +0200 |
commit | 67caa2e6538f13ff7a0d77e98ad6c58af998376d (patch) | |
tree | d7ec492d7a54460a0d94b322911dda2b2595a514 /cmdline | |
parent | 2a884c612b10b27f4be2cc6dd689bfe448d9361a (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 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 2 | ||||
-rw-r--r-- | cmdline/apt-internal-solver.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index d6cd94f72..aed1beb4d 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -540,7 +540,7 @@ static bool DoDSelectUpgrade(CommandLine &) } // Now upgrade everything - if (pkgAllUpgrade(Cache) == false) + if (APT::Upgrade::Upgrade(Cache, APT::Upgrade::FORBID_REMOVE_PACKAGES | APT::Upgrade::FORBID_INSTALL_NEW_PACKAGES) == false) { ShowBroken(c1out,Cache,false); return _error->Error(_("Internal error, problem resolver broke stuff")); diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc index c24a96cdf..0f2ec6283 100644 --- a/cmdline/apt-internal-solver.cc +++ b/cmdline/apt-internal-solver.cc @@ -175,10 +175,10 @@ int main(int argc,const char *argv[]) /*{{{*/ std::string failure; if (upgrade == true) { - if (pkgAllUpgrade(CacheFile) == false) + if (APT::Upgrade::Upgrade(CacheFile, APT::Upgrade::FORBID_REMOVE_PACKAGES | APT::Upgrade::FORBID_INSTALL_NEW_PACKAGES) == false) failure = "ERR_UNSOLVABLE_UPGRADE"; } else if (distUpgrade == true) { - if (pkgDistUpgrade(CacheFile) == false) + if (APT::Upgrade::Upgrade(CacheFile, APT::Upgrade::ALLOW_EVERYTHING) == false) failure = "ERR_UNSOLVABLE_DIST_UPGRADE"; } else if (Fix.Resolve() == false) failure = "ERR_UNSOLVABLE"; |