diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-06-18 15:05:32 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-06-18 15:05:32 +0200 |
commit | 9eb0042bef1f1b6b1603fb234cdbc53fc76b2ce7 (patch) | |
tree | 62f2a9ac2c5727561af654b1aca48532d77203ec | |
parent | ac2c559b33db7a2dbec3a95760ee2497baf7017a (diff) |
readd pkgPackageManager::Go() to not break API
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 8 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.h | 13 | ||||
-rw-r--r-- | apt-pkg/packagemanager.h | 1 |
3 files changed, 2 insertions, 20 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 76b708359..2dcdf916f 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1031,7 +1031,6 @@ void pkgDPkgPM::BuildPackagesProgressMap() } } /*}}}*/ -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13) bool pkgDPkgPM::Go(int StatusFd) { APT::Progress::PackageManager *progress = NULL; @@ -1040,9 +1039,8 @@ bool pkgDPkgPM::Go(int StatusFd) else progress = new APT::Progress::PackageManagerProgressFd(StatusFd); - return GoNoABIBreak(progress); + return Go(progress); } -#endif void pkgDPkgPM::StartPtyMagic() { @@ -1114,11 +1112,7 @@ void pkgDPkgPM::StopPtyMagic() * through to human readable (and i10n-able) * names and calculates a percentage for each step. */ -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) -#else -bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress) -#endif { pkgPackageManager::SigINTStop = false; d->progress = progress; diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 859c74b46..e967bfe99 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -117,27 +117,14 @@ class pkgDPkgPM : public pkgPackageManager void DoTerminalPty(int master); void DoDpkgStatusFd(int statusfd); void ProcessDpkgStatusLine(char *line); -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13) - void DoDpkgStatusFd(int statusfd, int /*unused*/) { - DoDpkgStatusFd(statusfd); - } - void ProcessDpkgStatusLine(int /*unused*/, char *line) { - ProcessDpkgStatusLine(line); - } -#endif - // The Actuall installation implementation virtual bool Install(PkgIterator Pkg,std::string File); virtual bool Configure(PkgIterator Pkg); virtual bool Remove(PkgIterator Pkg,bool Purge = false); -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) virtual bool Go(APT::Progress::PackageManager *progress); -#else virtual bool Go(int StatusFd=-1); - bool GoNoABIBreak(APT::Progress::PackageManager *progress); -#endif virtual void Reset(); diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 558132ceb..4972dcd04 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -98,6 +98,7 @@ class pkgPackageManager : protected pkgCache::Namespace virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;}; #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) virtual bool Go(APT::Progress::PackageManager * /*progress*/) {return true;}; + virtual bool Go(int /*statusFd*/=-1) {return true;}; #else virtual bool Go(int /*statusFd*/=-1) {return true;}; #endif |