summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-10-31 08:23:12 +0100
committerMichael Vogt <mvo@debian.org>2013-10-31 08:23:12 +0100
commitbd5f39b34cc0e8cebbe9103f569d4d903e75bd2b (patch)
tree841b7121ddb1a782c5afb51ff80f448de8f7125e /apt-pkg/packagemanager.cc
parent00354054c15b030b90aca8a79b62b4ab2844e3f0 (diff)
restore ABI and prepare next ABI via #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc36
1 files changed, 30 insertions, 6 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index a2079a2e4..3fdd9b637 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -1030,15 +1030,16 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
// PM::DoInstallPostFork - compat /*{{{*/
// ---------------------------------------------------------------------
/*}}}*/
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
pkgPackageManager::OrderResult
pkgPackageManager::DoInstallPostFork(int statusFd)
{
- APT::Progress::PackageManager *progress = new
- APT::Progress::PackageManagerProgressFd(statusFd);
- pkgPackageManager::OrderResult res = DoInstallPostFork(progress);
- delete progress;
- return res;
- }
+ APT::Progress::PackageManager *progress = new
+ APT::Progress::PackageManagerProgressFd(statusFd);
+ pkgPackageManager::OrderResult res = DoInstallPostFork(progress);
+ delete progress;
+ return res;
+}
/*}}}*/
// PM::DoInstallPostFork - Does install part that happens after the fork /*{{{*/
// ---------------------------------------------------------------------
@@ -1051,10 +1052,22 @@ pkgPackageManager::DoInstallPostFork(APT::Progress::PackageManager *progress)
return Res;
};
+#else
+pkgPackageManager::OrderResult
+pkgPackageManager::DoInstallPostFork(int statusFd)
+{
+ bool goResult = Go(statusFd);
+ if(goResult == false)
+ return Failed;
+
+ return Res;
+}
+#endif
/*}}}*/
// PM::DoInstall - Does the installation /*{{{*/
// ---------------------------------------------------------------------
/* compat */
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
pkgPackageManager::OrderResult
pkgPackageManager::DoInstall(int statusFd)
{
@@ -1064,11 +1077,21 @@ pkgPackageManager::DoInstall(int statusFd)
delete progress;
return res;
}
+#else
+pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int statusFd)
+{
+ if(DoInstallPreFork() == Failed)
+ return Failed;
+
+ return DoInstallPostFork(statusFd);
+}
+#endif
/*}}}*/
// PM::DoInstall - Does the installation /*{{{*/
// ---------------------------------------------------------------------
/* This uses the filenames in FileNames and the information in the
DepCache to perform the installation of packages.*/
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
pkgPackageManager::OrderResult
pkgPackageManager::DoInstall(APT::Progress::PackageManager *progress)
{
@@ -1077,4 +1100,5 @@ pkgPackageManager::DoInstall(APT::Progress::PackageManager *progress)
return DoInstallPostFork(progress);
}
+#endif
/*}}}*/