reintroduce #clear and #include in the config files,
authorDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 7 Sep 2009 12:59:19 +0000 (14:59 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 7 Sep 2009 12:59:19 +0000 (14:59 +0200)
they there broken since 0.7.21 with the introduction of #-comments

apt-pkg/contrib/configuration.cc

index b83ece3..4e8586e 100644 (file)
@@ -601,9 +601,11 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional,
            InQuote = !InQuote;
         if (InQuote == true)
            continue;
-        
-        if ((*I == '/' && I + 1 != End && I[1] == '/') || *I == '#')
-         {
+
+        if ((*I == '/' && I + 1 != End && I[1] == '/') ||
+            (*I == '#' && strcmp(string(I,I+6).c_str(),"#clear") != 0 &&
+             strcmp(string(I,I+8).c_str(),"#include") != 0))
+        {
            End = I;
            break;
         }