summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-02-11 12:19:48 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-02-11 12:19:48 +0100
commit4d174dc84ea184b5afa81abb3b94e2ef3380ece8 (patch)
treee223f1de7c70fd92218e2d203fc13ae5af18bd3b /apt-pkg/pkgcache.cc
parent67e0766f0eab85ce1aeacee75fc6b200f36996c9 (diff)
Add Multi-Arch: allowed support by creating an implicit provide of
name:any for such packages, so dependencies in this style can be easily resolved.
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 7d98869ea..2d4ee1010 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -186,7 +186,10 @@ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
size_t const found = Name.find(':');
if (found == string::npos)
return FindPkg(Name, "native");
- return FindPkg(Name.substr(0, found), Name.substr(found+1, string::npos));
+ string const Arch = Name.substr(found+1);
+ if (Arch == "any")
+ return FindPkg(Name, "any");
+ return FindPkg(Name.substr(0, found), Arch);
}
/*}}}*/
// Cache::FindPkg - Locate a package by name /*{{{*/