summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-05 13:29:50 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:18 +0200
commit384f17b40efb7b966001b2f7620b18324b507c55 (patch)
tree70921051d7366f510c6be41110c0541908fd70f7 /apt-pkg/deb/deblistparser.cc
parentf6ce7ffce526432a855166074332f97b37ad98db (diff)
M-A: allowed pkgs of unconfigured archs do not statisfy :any
We parse all architectures we encounter recently, which means we also parse packages from architectures which are neither native nor foreign, but still came onto the system somehow (usually via heavy force).
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 6a802b39f..602e96e26 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -824,13 +824,13 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
/* */
bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
{
+ string const Arch = Ver.Arch();
const char *Start;
const char *Stop;
if (Section.Find("Provides",Start,Stop) == true)
{
string Package;
string Version;
- string const Arch = Ver.Arch();
unsigned int Op;
while (1)
@@ -847,8 +847,9 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
if (NewProvides(Ver, Package, OtherArch, Version, pkgCache::Flag::ArchSpecific) == false)
return false;
} else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign) {
- if (NewProvidesAllArch(Ver, Package, Version, 0) == false)
- return false;
+ if (APT::Configuration::checkArchitecture(Arch))
+ if (NewProvidesAllArch(Ver, Package, Version, 0) == false)
+ return false;
} else {
if (NewProvides(Ver, Package, Arch, Version, 0) == false)
return false;
@@ -859,13 +860,16 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
}
}
- if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed)
+ if (APT::Configuration::checkArchitecture(Arch))
{
- string const Package = string(Ver.ParentPkg().Name()).append(":").append("any");
- return NewProvides(Ver, Package, "any", Ver.VerStr(), pkgCache::Flag::MultiArchImplicit);
+ if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed)
+ {
+ string const Package = string(Ver.ParentPkg().Name()).append(":").append("any");
+ return NewProvides(Ver, Package, "any", Ver.VerStr(), pkgCache::Flag::MultiArchImplicit);
+ }
+ else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign)
+ return NewProvidesAllArch(Ver, Ver.ParentPkg().Name(), Ver.VerStr(), pkgCache::Flag::MultiArchImplicit);
}
- else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign)
- return NewProvidesAllArch(Ver, Ver.ParentPkg().Name(), Ver.VerStr(), pkgCache::Flag::MultiArchImplicit);
return true;
}