summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/deblistparser.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 462818a03..49bc3adfc 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -853,10 +853,16 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
while (1)
{
Start = ParseDepends(Start,Stop,Package,Version,Op);
+ const size_t archfound = Package.rfind(':');
if (Start == 0)
return _error->Error("Problem parsing Provides line");
if (Op != pkgCache::Dep::NoOp && Op != pkgCache::Dep::Equals) {
_error->Warning("Ignoring Provides line with non-equal DepCompareOp for package %s", Package.c_str());
+ } else if (archfound != string::npos) {
+ string OtherArch = Package.substr(archfound+1, string::npos);
+ Package = Package.substr(0, archfound);
+ if (NewProvides(Ver, Package, OtherArch, Version) == false)
+ return false;
} else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign) {
if (NewProvidesAllArch(Ver, Package, Version) == false)
return false;