summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:50:37 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:50:37 +0000
commitf55a958ff2251f0061ab907157c99a350e56025f (patch)
tree244ee844d1a240d9566865667c7f77a3c3fb5100 /apt-pkg/tagfile.cc
parent578bfd0aed2ec993f4ad85fa6a7094a852261422 (diff)
Checkpoint
Author: jgg Date: 1998-07-04 05:57:34 GMT Checkpoint
Diffstat (limited to 'apt-pkg/tagfile.cc')
-rw-r--r--apt-pkg/tagfile.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index 106b0febe..62d66590b 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: tagfile.cc,v 1.1 1998/07/02 02:58:13 jgg Exp $
+// $Id: tagfile.cc,v 1.2 1998/07/04 05:57:39 jgg Exp $
/* ######################################################################
Fast scanner for RFC-822 type header information
@@ -147,18 +147,31 @@ bool pkgTagSection::Find(const char *Tag,const char *&Start,
/*}}}*/
#include <pkglib/pkgcachegen.h>
+#include <pkglib/deblistparser.h>
int main(int argc,char *argv[])
{
{
File F(argv[1],File::ReadOnly);
- pkgTagFile Test(F);
File CacheF("./cache",File::WriteEmpty);
DynamicMMap Map(CacheF,MMap::Public);
pkgCacheGenerator Gen(Map);
- Gen.SelectFile("tet");
+ Gen.SelectFile(argv[1]);
+
+ debListParser Parser(F);
+ Gen.MergeList(Parser);
}
+ {
+ File CacheF("./cache",File::WriteExists);
+ MMap Map(CacheF,MMap::Public);
+ pkgCache Cache(Map);
+ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
+ {
+ cout << "Package: " << I.Name() << endl;
+ }
+ }
+
#if 0
pkgTagSection I;
while (Test.Step(I) == true)