summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc14
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)