summaryrefslogtreecommitdiff
path: root/apt-pkg/upgrade.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2015-06-23 12:17:35 +0100
committerMichael Vogt <mvo@debian.org>2015-06-23 12:17:35 +0100
commit245dde96193702f7f51389d3583dee547f8ba366 (patch)
tree6cf8c191641c760bcc6a6c08fb0ff65d27e0cffd /apt-pkg/upgrade.cc
parent5530255b5f3ad7de2e23dfcb39ce325001126501 (diff)
parentc8a4ce6cbed57ae108dc955d4a850f9b129a0693 (diff)
Merge remote-tracking branch 'donkult/debian/experimental' into debian/experimental
Diffstat (limited to 'apt-pkg/upgrade.cc')
-rw-r--r--apt-pkg/upgrade.cc28
1 files changed, 18 insertions, 10 deletions
diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc
index ca670bdf5..6c8721da8 100644
--- a/apt-pkg/upgrade.cc
+++ b/apt-pkg/upgrade.cc
@@ -24,7 +24,7 @@
The problem resolver is used to resolve the problems.
*/
-bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
+static bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
if (solver != "internal")
@@ -120,6 +120,10 @@ bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
Progress->Done();
return success;
}
+bool pkgDistUpgrade(pkgDepCache &Cache)
+{
+ return pkgDistUpgrade(Cache, NULL);
+}
/*}}}*/
// AllUpgradeNoNewPackages - Upgrade but no removals or new pkgs /*{{{*/
static bool pkgAllUpgradeNoNewPackages(pkgDepCache &Cache, OpProgress * const Progress)
@@ -229,10 +233,14 @@ static bool pkgAllUpgradeWithNewPackages(pkgDepCache &Cache, OpProgress * const
/* Right now the system must be consistent before this can be called.
It also will not change packages marked for install, it only tries
to install packages not marked for install */
-bool pkgAllUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
+static bool pkgAllUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
{
return pkgAllUpgradeNoNewPackages(Cache, Progress);
}
+bool pkgAllUpgrade(pkgDepCache &Cache)
+{
+ return pkgAllUpgrade(Cache, NULL);
+}
/*}}}*/
// MinimizeUpgrade - Minimizes the set of packages to be upgraded /*{{{*/
// ---------------------------------------------------------------------
@@ -280,13 +288,15 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache)
}
/*}}}*/
// APT::Upgrade::Upgrade - Upgrade using a specific strategy /*{{{*/
-bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Progress)
+#if APT_PKG_ABI < 413
+bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode)
{
-#if __GNUC__ >= 4
- // the deprecated methods will become our privates, so that is fine
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ return Upgrade(Cache, mode, NULL);
+}
#endif
+bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Progress)
+{
+APT_IGNORE_DEPRECATED_PUSH
if (mode == ALLOW_EVERYTHING)
return pkgDistUpgrade(Cache, Progress);
else if ((mode & ~FORBID_REMOVE_PACKAGES) == 0)
@@ -295,9 +305,7 @@ bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Prog
return pkgAllUpgradeNoNewPackages(Cache, Progress);
else
_error->Error("pkgAllUpgrade called with unsupported mode %i", mode);
-#if __GNUC__ >= 4
- #pragma GCC diagnostic pop
-#endif
+APT_IGNORE_DEPRECATED_POP
return false;
}
/*}}}*/