From 67caa2e6538f13ff7a0d77e98ad6c58af998376d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 17 Aug 2014 13:27:59 +0200 Subject: 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 --- cmdline/apt-internal-solver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmdline/apt-internal-solver.cc') 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"; -- cgit v1.2.3