diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-11-07 18:18:14 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-11-08 14:29:25 +0100 |
commit | fa5404ab01bdf06eaf147d9f133139e6c89b906a (patch) | |
tree | 431e763fc49e892b7c59286fc2b80102cd8ebfff /apt-pkg/upgrade.cc | |
parent | 02e20767719873fa8f1919bd0e7a75f63e00c484 (diff) |
explicit overload methods instead of adding parameters
Adding a new parameter (with a default) is an ABI break, but you can
overload a method, which is "just" an API break for everyone doing
references to this method (aka: nobody).
Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/upgrade.cc')
-rw-r--r-- | apt-pkg/upgrade.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc index 41e76802a..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,6 +288,12 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) } /*}}}*/ // APT::Upgrade::Upgrade - Upgrade using a specific strategy /*{{{*/ +#if APT_PKG_ABI < 413 +bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode) +{ + return Upgrade(Cache, mode, NULL); +} +#endif bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Progress) { APT_IGNORE_DEPRECATED_PUSH |