readd pkgPackageManager::Go() to not break API
authorMichael Vogt <mvo@ubuntu.com>
Wed, 18 Jun 2014 13:05:32 +0000 (15:05 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Wed, 18 Jun 2014 13:05:32 +0000 (15:05 +0200)
apt-pkg/deb/dpkgpm.cc
apt-pkg/deb/dpkgpm.h
apt-pkg/packagemanager.h

index 76b7083595992a98962604845d63459bdaff1ad3..2dcdf916fe7cebd5c7c6d47e79e505e3eea4c48c 100644 (file)
@@ -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;
index 859c74b46a682335052ce8324cd96c8482a67cee..e967bfe994b07f9ade9bc9a04034b32f6f92cf8d 100644 (file)
@@ -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();
    
index 558132ceb2a42eb7073db4f06195a014f31a5bbe..4972dcd04bbea1efb736513c4ae6cf30be2740b5 100644 (file)
@@ -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