diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-03-25 22:12:29 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-03-25 22:12:29 +0100 |
commit | ca238ede0446483c107ace331324cbee0f096361 (patch) | |
tree | c076b941621387070ad6e77dc5b9d298e5a4bfb2 /apt-pkg/deb | |
parent | 566046f403acb3f50df78be93ea3b68b9f2c3e7b (diff) |
* apt-pkg/cacheiterator.h:
- return "all" instead of native architecture without breaking the abi
(too much) by extending enum instead of using bitflags (LP: #733741)
With the next abi break that enum should be a char bitflag instead
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index edc001abb..b79cef41c 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -106,7 +106,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) Ver->MultiArch = pkgCache::Version::None; else if (MultiArch == "same") { // Parse multi-arch - if (Section.FindS("Architecture") == "all") + if (ArchitectureAll() == true) { /* Arch all packages can't be Multi-Arch: same */ _error->Warning("Architecture: all package '%s' can't be Multi-Arch: same", @@ -127,6 +127,14 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) Ver->MultiArch = pkgCache::Version::None; } + 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; + } + // Archive Size Ver->Size = Section.FindULL("Size"); // Unpacked Size (in K) @@ -677,13 +685,13 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver) } } - if (Ver->MultiArch == pkgCache::Version::Allowed) + if (Ver->MultiArch == pkgCache::Version::Allowed || Ver->MultiArch == pkgCache::Version::AllAllowed) { string const Package = string(Ver.ParentPkg().Name()).append(":").append("any"); NewProvides(Ver, Package, "any", Ver.VerStr()); } - if (Ver->MultiArch != pkgCache::Version::Foreign) + if (Ver->MultiArch != pkgCache::Version::Foreign && Ver->MultiArch != pkgCache::Version::AllForeign) return true; if (MultiArchEnabled == false) |