* apt-pkg/deb/debmetaindex.cc:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 11 Jul 2010 16:50:41 +0000 (18:50 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 11 Jul 2010 16:50:41 +0000 (18:50 +0200)
  - do not query each architecture for flat file archives

apt-pkg/deb/debindexfile.cc
apt-pkg/deb/deblistparser.cc
apt-pkg/deb/debmetaindex.cc
apt-pkg/pkgcachegen.cc
debian/changelog

index 7e9a973..ba5b3f2 100644 (file)
@@ -184,8 +184,8 @@ string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator Ver) const
    Res += " ";
    Res += Ver.ParentPkg().Name();
    Res += " ";
-   Res += Ver.Arch();
-   Res += " ";
+   if (Dist[Dist.size() - 1] != '/')
+      Res.append(Ver.Arch()).append(" ");
    Res += Ver.VerStr();
    return Res;
 }
@@ -219,8 +219,8 @@ string debPackagesIndex::Info(const char *Type) const
    else
       Info += Dist + '/' + Section;   
    Info += " ";
-   Info += Architecture;
-   Info += " ";
+   if (Dist[Dist.size() - 1] != '/')
+      Info += Architecture + " ";
    Info += Type;
    return Info;
 }
index 2cfeb23..5fb7379 100644 (file)
@@ -757,7 +757,7 @@ bool debListParser::Step()
       if (Architecture.empty() == true)
         return true;
 
-      if (Arch.empty() == true || MultiArchEnabled == false)
+      if (Arch.empty() == true || Arch == "any" || MultiArchEnabled == false)
       {
         if (APT::Configuration::checkArchitecture(Architecture) == true)
            return true;
index 8df3ed1..7366bd6 100644 (file)
@@ -332,7 +332,12 @@ class debSLTypeDebian : public pkgSourceList::Type
            if (IsSrc == true)
               Deb->PushSectionEntry("source", new debReleaseIndex::debSectionEntry(Section, IsSrc));
            else
-              Deb->PushSectionEntry(Archs, new debReleaseIndex::debSectionEntry(Section, IsSrc));
+           {
+              if (Dist[Dist.size() - 1] == '/')
+                 Deb->PushSectionEntry("any", new debReleaseIndex::debSectionEntry(Section, IsSrc));
+              else
+                 Deb->PushSectionEntry(Archs, new debReleaseIndex::debSectionEntry(Section, IsSrc));
+           }
            return true;
         }
       }
@@ -342,7 +347,12 @@ class debSLTypeDebian : public pkgSourceList::Type
       if (IsSrc == true)
         Deb->PushSectionEntry ("source", new debReleaseIndex::debSectionEntry(Section, IsSrc));
       else
-        Deb->PushSectionEntry (Archs, new debReleaseIndex::debSectionEntry(Section, IsSrc));
+      {
+        if (Dist[Dist.size() - 1] == '/')
+           Deb->PushSectionEntry ("any", new debReleaseIndex::debSectionEntry(Section, IsSrc));
+        else
+           Deb->PushSectionEntry (Archs, new debReleaseIndex::debSectionEntry(Section, IsSrc));
+      }
       List.push_back(Deb);
       return true;
    }
index 1175d51..38f2d6a 100644 (file)
@@ -1094,6 +1094,7 @@ static bool BuildCache(pkgCacheGenerator &Gen,
    return true;
 }
                                                                        /*}}}*/
+// CacheGenerator::CreateDynamicMMap - load an mmap with configuration options /*{{{*/
 DynamicMMap* pkgCacheGenerator::CreateDynamicMMap(FileFd *CacheF, unsigned long Flags) {
    unsigned long const MapStart = _config->FindI("APT::Cache-Start", 24*1024*1024);
    unsigned long const MapGrow = _config->FindI("APT::Cache-Grow", 1*1024*1024);
@@ -1106,6 +1107,7 @@ DynamicMMap* pkgCacheGenerator::CreateDynamicMMap(FileFd *CacheF, unsigned long
    else
       return new DynamicMMap(Flags, MapStart, MapGrow, MapLimit);
 }
+                                                                       /*}}}*/
 // CacheGenerator::MakeStatusCache - Construct the status cache                /*{{{*/
 // ---------------------------------------------------------------------
 /* This makes sure that the status cache (the cache that has all 
index bc35468..b506fa4 100644 (file)
@@ -4,6 +4,8 @@ apt (0.7.26~exp10) UNRELEASED; urgency=low
   * apt-pkg/contrib/error.{cc,h}:
     - remove constness of va_list parameter to fix build on amd64 and co
       Thanks Eric Valette! (Closes: #588610)
+  * apt-pkg/deb/debmetaindex.cc:
+    - do not query each architecture for flat file archives
 
   [ Martin Pitt ]
   * debian/rules: