summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:54:23 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:54:23 +0000
commitddc1d8d08eaff6c71c6062654ddd9d8981799ae9 (patch)
tree745d470d679bf169cab6da3f3322f40121e1f81c /apt-pkg/deb/deblistparser.cc
parent727f18afe9c2eec15ee446cb667d9561644b5bf6 (diff)
Minor cleanups, fix for checksum lowercase bug
Author: jgg Date: 1999-07-26 17:46:07 GMT Minor cleanups, fix for checksum lowercase bug
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 182d46829..86cd526fb 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: deblistparser.cc,v 1.20 1999/06/04 05:54:20 jgg Exp $
+// $Id: deblistparser.cc,v 1.21 1999/07/26 17:46:08 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -24,6 +24,7 @@
/* */
debListParser::debListParser(FileFd &File) : Tags(File)
{
+ Arch = _config->Find("APT::architecture");
}
/*}}}*/
// ListParser::UniqFindTagWrite - Find the tag and write a unq string /*{{{*/
@@ -157,7 +158,7 @@ unsigned short debListParser::VersionHash()
char *I = S;
for (; Start != End; Start++)
if (isspace(*Start) == 0)
- *I++ = *Start;
+ *I++ = tolower(*Start);
Result = AddCRC16(Result,S,I - S);
}
@@ -466,11 +467,11 @@ bool debListParser::GrabWord(string Word,WordList *List,int Count,
bool debListParser::Step()
{
iOffset = Tags.Offset();
- string Arch = _config->Find("APT::architecture");
while (Tags.Step(Section) == true)
- {
- /* See if this is the correct Architecture, if it isnt then we
- drop the whole section */
+ {
+ /* See if this is the correct Architecture, if it isn't then we
+ drop the whole section. A missing arch tag only happens (in theory)
+ inside the Status file, so that is a positive return */
const char *Start;
const char *Stop;
if (Section.Find("Architecture",Start,Stop) == false)