summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/deblistparser.cc4
-rw-r--r--apt-pkg/deb/debrecords.cc32
-rw-r--r--apt-pkg/deb/debrecords.h38
3 files changed, 72 insertions, 2 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index f1c1925e1..8b778a726 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.9 1998/07/26 04:49:37 jgg Exp $
+// $Id: deblistparser.cc,v 1.10 1998/08/09 00:51:35 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -167,7 +167,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver)
return false;
if (ParseDepends(Ver,"Conflicts",pkgCache::Dep::Conflicts) == false)
return false;
- if (ParseDepends(Ver,"Replaces",pkgCache::Dep::Depends) == false)
+ if (ParseDepends(Ver,"Replaces",pkgCache::Dep::Replaces) == false)
return false;
if (ParseProvides(Ver) == false)
diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc
new file mode 100644
index 000000000..ae0acce18
--- /dev/null
+++ b/apt-pkg/deb/debrecords.cc
@@ -0,0 +1,32 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+// $Id: debrecords.cc,v 1.1 1998/08/09 00:51:36 jgg Exp $
+/* ######################################################################
+
+ Debian Package Records - Parser for debian package records
+
+ ##################################################################### */
+ /*}}}*/
+// Include Files /*{{{*/
+#ifdef __GNUG__
+#pragma implementation "apt-pkg/debrecords.h"
+#endif
+#include <apt-pkg/debrecords.h>
+#include <apt-pkg/error.h>
+ /*}}}*/
+
+// RecordParser::debRecordParser - Constructor /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+debRecordParser::debRecordParser(FileFd &File) : Tags(File,4*1024)
+{
+}
+ /*}}}*/
+// RecordParser::Jump - Jump to a specific record /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool debRecordParser::Jump(pkgCache::VerFileIterator &Ver)
+{
+ return Tags.Jump(Section,Ver->Offset);
+}
+ /*}}}*/
diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h
new file mode 100644
index 000000000..0bd8da921
--- /dev/null
+++ b/apt-pkg/deb/debrecords.h
@@ -0,0 +1,38 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+// $Id: debrecords.h,v 1.1 1998/08/09 00:51:36 jgg Exp $
+/* ######################################################################
+
+ Debian Package Records - Parser for debian package records
+
+ This provides display-type parsing for the Packages file. This is
+ different than the the list parser which provides cache generation
+ services. There should be no overlap between these two.
+
+ ##################################################################### */
+ /*}}}*/
+// Header section: pkglib
+#ifndef PKGLIB_DEBRECORDS_H
+#define PKGLIB_DEBRECORDS_H
+
+#ifdef __GNUG__
+#pragma interface "apt-pkg/debrecords.h"
+#endif
+
+#include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/tagfile.h>
+
+class debRecordParser : public pkgRecords::Parser
+{
+ pkgTagFile Tags;
+ pkgTagSection Section;
+
+ public:
+
+ virtual bool Jump(pkgCache::VerFileIterator &Ver);
+
+ debRecordParser(FileFd &File);
+};
+
+
+#endif