]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/sourcelist.cc
Merge remote-tracking branch 'mvo/feature/update-by-hash' into debian/experimental
[apt.git] / apt-pkg / sourcelist.cc
index bbc514f5bbfea60be776b9e9502bde6f9de6089e..e37899ec679446a6ba24a1a47b597ab9ffceb63f 100644 (file)
 #include <apt-pkg/metaindex.h>
 #include <apt-pkg/indexfile.h>
 #include <apt-pkg/tagfile.h>
-
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <ctype.h>
+#include <stddef.h>
+#include <time.h>
+#include <cstring>
+#include <map>
+#include <string>
+#include <vector>
 #include <fstream>
+#include <algorithm>
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -91,7 +101,12 @@ bool pkgSourceList::Type::ParseStanza(vector<metaIndex *> &List,
    };
    for (unsigned int j=0; j < sizeof(option_deb822)/sizeof(char*); j++)
       if (Tags.Exists(option_deb822[j]))
-         Options[option_internal[j]] = Tags.FindS(option_deb822[j]);
+      {
+         // for deb822 the " " is the delimiter, but the backend expects ","
+         std::string option = Tags.FindS(option_deb822[j]);
+         std::replace(option.begin(), option.end(), ' ', ',');
+         Options[option_internal[j]] = option;
+      }
    
    // now create one item per suite/section
    string Suite = Tags.FindS("Suites");
@@ -297,7 +312,7 @@ bool pkgSourceList::Read(string File)
 /* */
 bool pkgSourceList::ReadAppend(string File)
 {
-   if (_config->FindB("APT::Sources::Use-Deb822", true) == true)
+   if (_config->FindB("APT::Sources::Use-Deb822", false) == true)
    {
       int lines_parsed =ParseFileDeb822(File);
       if (lines_parsed < 0)