summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-04-05 11:58:09 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-04-05 11:58:09 +0200
commit70d761713bf1b1b4520079161708f66e8e3a4e31 (patch)
tree2467b28af8632554bc6f4ad186abe9ee0546ffa9 /apt-pkg/pkgcache.cc
parent8d39b60d85b8123758f310e4a279c71879e13a06 (diff)
parent00870bf52186b5adb9819c707b411ac2fffe482b (diff)
merged from debian-sid
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 7014aee22..c6326abf1 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -317,22 +317,22 @@ pkgCache::PkgIterator pkgCache::GrpIterator::FindPkg(string Arch) const {
if (unlikely(IsGood() == false || S->FirstPackage == 0))
return PkgIterator(*Owner, 0);
+ /* If we accept any package we simply return the "first"
+ package in this group (the last one added). */
+ if (Arch == "any")
+ return PkgIterator(*Owner, Owner->PkgP + S->FirstPackage);
+
static string const myArch = _config->Find("APT::Architecture");
/* Most of the time the package for our native architecture is
the one we add at first to the cache, but this would be the
last one we check, so we do it now. */
- if (Arch == "native" || Arch == myArch) {
+ if (Arch == "native" || Arch == myArch || Arch == "all") {
Arch = myArch;
pkgCache::Package *Pkg = Owner->PkgP + S->LastPackage;
if (stringcasecmp(Arch, Owner->StrP + Pkg->Arch) == 0)
return PkgIterator(*Owner, Pkg);
}
- /* If we accept any package we simply return the "first"
- package in this group (the last one added). */
- if (Arch == "any")
- return PkgIterator(*Owner, Owner->PkgP + S->FirstPackage);
-
/* Iterate over the list to find the matching arch
unfortunately this list includes "package noise"
(= different packages with same calculated hash),