summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2011-04-04 16:49:21 +0200
committerMichael Vogt <mvo@debian.org>2011-04-04 16:49:21 +0200
commitbee9ae120eeaf9f43c9688440fc3fdb8d02bf94a (patch)
tree16f267931477609dca384e60b02cf3819764e171 /apt-pkg/pkgcache.cc
parent3a1f49c42aae17c23d52486db21fb7c05734dbd2 (diff)
parent410327e1ee0fac0c28a95e45ea75f7359cc8dcb4 (diff)
merged from lp:~donkult/apt/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),