summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-05-17 18:14:25 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-05-17 18:14:25 +0200
commit894d672e9b7517573266cda333612e70441cbda8 (patch)
treef4c76670bcd9048188968bb2c5d962e3a6238026 /apt-pkg/deb/deblistparser.cc
parent98278a81bf554246b70b97852c9b8b92eac390ea (diff)
* apt-pkg/pkgcache.h:
- clean up mess with the "all" handling in MultiArch to fix LP: #733741 cleanly for everyone now
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc11
1 files changed, 3 insertions, 8 deletions
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;