diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-05-02 10:41:38 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-05-02 10:41:38 +0200 |
commit | 7ca70a9af1bc6af753ee3012d1840d5ddfafe37c (patch) | |
tree | c3d3a9e4759b87a0db20f9fbf5935bb2c13e5b97 /apt-pkg | |
parent | 904be3525223633721dc7b5bff22ae7d8db8cb95 (diff) |
merge single-arch :arch fix from my sid branch
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 c6326abf1..93d09a18e 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); if (Arch == "any") return FindPkg(Name, "any"); |