diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-04-25 13:51:53 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-04-25 13:51:53 +0200 |
commit | 254b8ebb92e82e0d7cf5aa1391bcfbbeb23d534e (patch) | |
tree | ad5ccc4f21d57ae8c49029aa07b0c750ae04af6e /apt-pkg | |
parent | b40f2c3bd7aace2dcf1e0262b9356906be9eb272 (diff) |
* apt-pkg/pkgcache.cc:
- really ignore :arch in FindPkg() in non-multiarch environment
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/pkgcache.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index b63900adb..862d05348 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -211,11 +211,14 @@ pkgCache::PkgIterator pkgCache::SingleArchFindPkg(const string &Name) // --------------------------------------------------------------------- /* Returns 0 on error, pointer to the package otherwise */ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) { - if (MultiArchCache() == false) - return SingleArchFindPkg(Name); size_t const found = Name.find(':'); if (found == string::npos) - return FindPkg(Name, "native"); + { + if (MultiArchCache() == false) + return SingleArchFindPkg(Name); + else + return FindPkg(Name, "native"); + } string const Arch = Name.substr(found+1); /* Beware: This is specialcased to handle pkg:any in dependencies as these are linked to virtual pkg:any named packages with all archs. |