summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:54:47 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:54:47 +0000
commit421c8d109932a2615b9327c8b69aad715d4b1162 (patch)
tree598bab85a1d54cda33ef75662b5287b2c47f7be0 /apt-pkg/deb
parenteecf9bf7744f44f011234bccfc35218f80ae3526 (diff)
Bug fixes
Author: jgg Date: 1999-09-30 06:30:34 GMT Bug fixes
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/deblistparser.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 59d15f7d0..9da03a7f6 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.22 1999/07/30 02:54:25 jgg Exp $
+// $Id: deblistparser.cc,v 1.23 1999/09/30 06:30:34 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -88,7 +88,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver)
{"extra",pkgCache::State::Extra}};
if (GrabWord(string(Start,Stop-Start),PrioList,
_count(PrioList),Ver->Priority) == false)
- return _error->Error("Malformed Priority line");
+ Ver->Priority = pkgCache::State::Extra;
}
if (ParseDepends(Ver,"Depends",pkgCache::Dep::Depends) == false)
@@ -154,11 +154,18 @@ unsigned short debListParser::VersionHash()
continue;
/* Strip out any spaces from the text, this undoes dpkgs reformatting
- of certain fields */
+ of certain fields. dpkg also has the rather interesting notion of
+ reformatting depends operators < -> <= */
char *I = S;
for (; Start != End; Start++)
+ {
if (isspace(*Start) == 0)
*I++ = tolower(*Start);
+ if (*Start == '<' && Start[1] != '<' && Start[1] != '=')
+ *I++ = '=';
+ if (*Start == '>' && Start[1] != '>' && Start[1] != '=')
+ *I++ = '=';
+ }
Result = AddCRC16(Result,S,I - S);
}