+// APT::Upgrade::Upgrade - Upgrade using a specific strategy /*{{{*/
+bool APT::Upgrade::Upgrade(pkgDepCache &Cache, APT::Upgrade::UpgradeMode mode)
+{
+ switch(mode) {
+ case APT::Upgrade::NO_INSTALL_OR_REMOVE:
+ return pkgAllUpgradeNoNewPackages(Cache);
+ case APT::Upgrade::ALLOW_NEW_INSTALLS:
+ return pkgAllUpgradeWithNewPackages(Cache);
+ case APT::Upgrade::ALLOW_REMOVAL_AND_NEW_INSTALLS:
+ return pkgDistUpgrade(Cache);
+ default:
+ _error->Error("pkgAllUpgrade called with unknwon mode %i", mode);
+ }
+ return false;
+}
+ /*}}}*/