summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-03-18 18:51:14 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-03-18 18:51:14 +0100
commit8d4c859d0d20687a8ffcf9e1d60466d061c2e24d (patch)
tree46e6fdd05df63623dad398972d7d84294619a6d8 /apt-pkg/pkgcache.h
parent306eacf617b8ea8c87b31258c55a5373be4ad946 (diff)
Readd the FindPkg() method implementation used in the singleArch days to
use it as a fallback if multiarch is not enabled. The effect is barly noticeable but SingleArch is the realworld scenario.
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r--apt-pkg/pkgcache.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 012caac76..577eebad9 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -126,7 +126,7 @@ class pkgCache /*{{{*/
// Accessors
GrpIterator FindGrp(const string &Name);
PkgIterator FindPkg(const string &Name);
- PkgIterator FindPkg(const string &Name, string Arch);
+ PkgIterator FindPkg(const string &Name, const string &Arch);
Header &Head() {return *HeaderP;};
inline GrpIterator GrpBegin();
@@ -136,6 +136,8 @@ class pkgCache /*{{{*/
inline PkgFileIterator FileBegin();
inline PkgFileIterator FileEnd();
+ inline bool MultiArchCache() const { return MultiArchEnabled; };
+
// Make me a function
pkgVersioningSystem *VS;
@@ -146,6 +148,10 @@ class pkgCache /*{{{*/
pkgCache(MMap *Map,bool DoMap = true);
virtual ~pkgCache() {};
+
+private:
+ bool MultiArchEnabled;
+ PkgIterator SingleArchFindPkg(const string &Name);
};
/*}}}*/
// Header structure /*{{{*/