From 894d672e9b7517573266cda333612e70441cbda8 Mon Sep 17 00:00:00 2001
From: David Kalnischkies <kalnischkies@gmail.com>
Date: Tue, 17 May 2011 18:14:25 +0200
Subject: * apt-pkg/pkgcache.h:   - clean up mess with the "all" handling in
 MultiArch to     fix LP: #733741 cleanly for everyone now

---
 apt-pkg/deb/deblistparser.cc | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

(limited to 'apt-pkg/deb/deblistparser.cc')

diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 4a9e94c85..a94b79f05 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -128,12 +128,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
    }
 
    if (ArchitectureAll() == true)
-      switch (Ver->MultiArch)
-      {
-	 case pkgCache::Version::Foreign: Ver->MultiArch = pkgCache::Version::AllForeign; break;
-	 case pkgCache::Version::Allowed: Ver->MultiArch = pkgCache::Version::AllAllowed; break;
-	 default: Ver->MultiArch = pkgCache::Version::All;
-      }
+      Ver->MultiArch |= pkgCache::Version::All;
 
    // Archive Size
    Ver->Size = Section.FindULL("Size");
@@ -687,12 +682,12 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
 
    if (MultiArchEnabled == false)
       return true;
-   else if (Ver->MultiArch == pkgCache::Version::Allowed || Ver->MultiArch == pkgCache::Version::AllAllowed)
+   else if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed)
    {
       string const Package = string(Ver.ParentPkg().Name()).append(":").append("any");
       return NewProvidesAllArch(Ver, Package, Ver.VerStr());
    }
-   else if (Ver->MultiArch == pkgCache::Version::Foreign || Ver->MultiArch == pkgCache::Version::AllForeign)
+   else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign)
       return NewProvidesAllArch(Ver, Ver.ParentPkg().Name(), Ver.VerStr());
 
    return true;
-- 
cgit v1.2.3