]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.cc
* merge of the debian-expermental-ma branch
[apt.git] / apt-pkg / deb / debmetaindex.cc
index eb01a015663337a3d6958df9cb04ec394005a88a..717d0bcdef3cdd5392af7b4e5009afb4524bf2a0 100644 (file)
@@ -23,7 +23,7 @@ string debReleaseIndex::Info(const char *Type, string const &Section, string con
    else
    {
       Info += Dist + '/' + Section;
-      if (Arch.empty() == true)
+      if (Arch.empty() != true)
         Info += " " + Arch;
    }
    Info += " ";
@@ -214,6 +214,7 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll) const
             s != sections.end(); ++s)
                for (set<string>::const_iterator l = s->second.begin();
                     l != s->second.end(); l++) {
+                       if (*l == "none") continue;
                        debTranslationsIndex i = debTranslationsIndex(URI,Dist,s->first,(*l).c_str());
                        i.GetIndexes(Owner);
                }
@@ -268,8 +269,10 @@ vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles() {
        for (map<string, set<string> >::const_iterator s = sections.begin();
             s != sections.end(); ++s)
                for (set<string>::const_iterator l = s->second.begin();
-                    l != s->second.end(); l++)
+                    l != s->second.end(); l++) {
+                       if (*l == "none") continue;
                        Indexes->push_back(new debTranslationsIndex(URI,Dist,s->first,(*l).c_str()));
+               }
 
        return Indexes;
 }
@@ -310,7 +313,7 @@ class debSLTypeDebian : public pkgSourceList::Type
    {
       map<string, string>::const_iterator const arch = Options.find("arch");
       vector<string> const Archs =
-               (arch != Options.end()) ? ExplodeString(arch->second) :
+               (arch != Options.end()) ? VectorizeString(arch->second, ',') :
                                APT::Configuration::getArchitectures();
 
       for (vector<metaIndex *>::const_iterator I = List.begin();
@@ -329,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;
         }
       }
@@ -339,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;
    }