]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.cc
cleanup the debian/rules file a bit
[apt.git] / apt-pkg / deb / debmetaindex.cc
index 947a7f04beef4b81f9620a790f37fd8a22d45ae6..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 += " ";
@@ -313,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();
@@ -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;
    }