]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/deblistparser.cc
Merge remote-tracking branch 'upstream/debian/jessie' into debian/sid
[apt.git] / apt-pkg / deb / deblistparser.cc
index 213235c2b16b217b1ca31fea7bb23d77fe10ac89..e87e7b5e49daa6dbf4e045d2966855edfd288c64 100644 (file)
@@ -817,10 +817,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;