]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/deblistparser.cc
Merge branch 'debian/experimental' into feature/srv-records
[apt.git] / apt-pkg / deb / deblistparser.cc
index 462818a039d7c24d354ab2669f5a70b5a3e335cd..b80b57bc46c3ff04059e01c1abc4587b74a2e77d 100644 (file)
@@ -806,7 +806,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
         if (NewDepends(Ver,Package,"none",Version,Op,Type) == false)
            return false;
       }
-      else if (MultiArchEnabled == true && found != string::npos &&
+      else if (found != string::npos &&
               strcmp(Package.c_str() + found, ":any") != 0)
       {
         string Arch = Package.substr(found+1, string::npos);
@@ -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;