summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-05-07 21:39:53 +0200
committerMichael Vogt <mvo@debian.org>2014-05-07 21:39:53 +0200
commitb58f28d4c4a06ef0a67cf3b6fe57aa08e7bc6b7e (patch)
tree7000f87e0e74dd32009050b313ce385832ba7529
parente0c7268ba7892a77f3767e270afc101468a5e9e1 (diff)
fix some compile errors in the now enabled #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
-rw-r--r--apt-pkg/cacheset.cc9
-rw-r--r--apt-pkg/contrib/configuration.cc4
-rw-r--r--apt-pkg/contrib/configuration.h6
-rw-r--r--apt-pkg/packagemanager.cc1
-rw-r--r--apt-pkg/packagemanager.h5
-rw-r--r--apt-private/private-install.cc1
6 files changed, 17 insertions, 9 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 2ed6a96da..5d7f28515 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -321,7 +321,8 @@ bool PackageContainerInterface::FromString(PackageContainerInterface * const pci
if (FromGroup(pci, Cache, str, helper) == false &&
FromTask(pci, Cache, str, helper) == false &&
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
- FromFnmatch(pci, Cache, str, helper) == false)
+ // FIXME: hm, hm, regexp/fnmatch incompatible?
+ FromFnmatch(pci, Cache, str, helper) == false &&
#endif
FromRegEx(pci, Cache, str, helper) == false)
{
@@ -610,7 +611,7 @@ void CacheSetHelper::canNotFindRegEx(PackageContainerInterface * const /*pci*/,
}
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
// canNotFindFnmatch - handle the case no package is found by a fnmatch /*{{{*/
-void CacheSetHelper::canNotFindFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern) {
+ void CacheSetHelper::canNotFindFnmatch(PackageContainerInterface * const /*pci*/, pkgCacheFile &/*Cache*/, std::string pattern) {
if (ShowError == true)
_error->Insert(ErrorType, _("Couldn't find any package by glob '%s'"), pattern.c_str());
}
@@ -676,8 +677,8 @@ APT_CONST void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const &/
/*}}}*/
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
// showFnmatchSelection /*{{{*/
-APT_CONST void CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator const &pkg,
- std::string const &pattern) {
+APT_CONST void CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator const &/*pkg*/,
+ std::string const &/*pattern*/) {
}
/*}}}*/
#endif
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 00f6ad0f9..fbe180f8e 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -254,7 +254,9 @@ string Configuration::FindDir(const char *Name,const char *Default) const
// ---------------------------------------------------------------------
/* Returns a vector of config values under the given item */
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
-vector<string> Configuration::FindVector(const char *Name) const { return FindVector(Name, ""); }
+vector<string> Configuration::FindVector(const char *Name) const {
+ return FindVector(Name, "");
+}
#endif
vector<string> Configuration::FindVector(const char *Name, std::string const &Default) const
{
diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h
index c256139f4..6345c8a5d 100644
--- a/apt-pkg/contrib/configuration.h
+++ b/apt-pkg/contrib/configuration.h
@@ -84,12 +84,10 @@ class Configuration
* \param Default list of values separated by commas */
std::vector<std::string> FindVector(const char *Name, std::string const &Default) const;
std::vector<std::string> FindVector(std::string const &Name, std::string const &Default) const { return FindVector(Name.c_str(), Default); };
-#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
- std::vector<std::string> FindVector(const char *Name) const { return FindVector(Name, ""); };
-#else
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
std::vector<std::string> FindVector(const char *Name) const;
#endif
- std::vector<std::string> FindVector(std::string const &Name) const { return FindVector(Name.c_str(), ""); };
+ std::vector<std::string> FindVector(std::string const &Name="") const { return FindVector(Name.c_str(), ""); };
int FindI(const char *Name,int const &Default = 0) const;
int FindI(std::string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);};
bool FindB(const char *Name,bool const &Default = false) const;
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 5d6bc6bd2..0ec9f3309 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -28,6 +28,7 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/install-progress.h>
#include <stddef.h>
#include <list>
diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h
index 344ed9192..8a51a455c 100644
--- a/apt-pkg/packagemanager.h
+++ b/apt-pkg/packagemanager.h
@@ -44,6 +44,11 @@ class pkgDepCache;
class pkgSourceList;
class pkgOrderList;
class pkgRecords;
+namespace APT {
+ namespace Progress {
+ class PackageManager;
+ };
+};
class pkgPackageManager : protected pkgCache::Namespace
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 35649fcdb..d9e485462 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -20,6 +20,7 @@
#include <apt-pkg/packagemanager.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/install-progress.h>
#include <errno.h>
#include <stdlib.h>