]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/deblistparser.cc
store ':any' pseudo-packages with 'any' as architecture
[apt.git] / apt-pkg / deb / deblistparser.cc
index d88e25e6fbd10d469528d0012e446f977e9d77a6..6a802b39f73568e35a41ff1bdd270b0c0a2704a8 100644 (file)
@@ -371,8 +371,8 @@ unsigned short debListParser::VersionHash()
    status = not-installed, config-files, half-installed, unpacked,
             half-configured, triggers-awaited, triggers-pending, installed
  */
-bool debListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
-                               pkgCache::VerIterator &Ver)
+bool debListParser::ParseStatus(pkgCache::PkgIterator &,
+                               pkgCache::VerIterator &)
 {
    return true;
 }
@@ -791,11 +791,16 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
         return _error->Error("Problem parsing dependency %s",Tag);
       size_t const found = Package.rfind(':');
 
-      if (found == string::npos || strcmp(Package.c_str() + found, ":any") == 0)
+      if (found == string::npos)
       {
         if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false)
            return false;
       }
+      else if (strcmp(Package.c_str() + found, ":any") == 0)
+      {
+        if (NewDepends(Ver,Package,"any",Version,Op,Type) == false)
+           return false;
+      }
       else
       {
         string Arch = Package.substr(found+1, string::npos);
@@ -857,7 +862,7 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
    if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed)
    {
       string const Package = string(Ver.ParentPkg().Name()).append(":").append("any");
-      return NewProvidesAllArch(Ver, Package, Ver.VerStr(), pkgCache::Flag::MultiArchImplicit);
+      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);