]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/deblistparser.cc
remove invalid pkgcache.bin and rebuild it if possible
[apt.git] / apt-pkg / deb / deblistparser.cc
index 4be626741e0292bef06738ac7cad3c2bfbb8a14a..4a9e94c855a2d8a24303f50e0f4005eabc2e1eb7 100644 (file)
@@ -284,18 +284,18 @@ unsigned short debListParser::VersionHash()
       /* Strip out any spaces from the text, this undoes dpkgs reformatting
          of certain fields. dpkg also has the rather interesting notion of
          reformatting depends operators < -> <= */
-      char *I = S;
+      char *J = S;
       for (; Start != End; Start++)
       {
         if (isspace(*Start) == 0)
-           *I++ = tolower_ascii(*Start);
+           *J++ = tolower_ascii(*Start);
         if (*Start == '<' && Start[1] != '<' && Start[1] != '=')
-           *I++ = '=';
+           *J++ = '=';
         if (*Start == '>' && Start[1] != '>' && Start[1] != '=')
-           *I++ = '=';
+           *J++ = '=';
       }
 
-      Result = AddCRC16(Result,S,I - S);
+      Result = AddCRC16(Result,S,J - S);
    }
    
    return Result;
@@ -487,7 +487,7 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
    // Parse off the package name
    const char *I = Start;
    for (;I != Stop && isspace(*I) == 0 && *I != '(' && *I != ')' &&
-       *I != ',' && *I != '|'; I++);
+       *I != ',' && *I != '|' && *I != '[' && *I != ']'; I++);
    
    // Malformed, no '('
    if (I != Stop && *I == ')')