summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:50:53 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:50:53 +0000
commit404ec98e5186c844003dee15e15bc96460cc27a5 (patch)
treeebff8ce1af4234d13f8af5aa021db7cbfe56dc4b /apt-pkg/pkgcachegen.cc
parent6fc33863f31051a5fc2726a236ce8b64d33bc964 (diff)
Generic progress meter
Author: jgg Date: 1998-07-21 05:33:18 GMT Generic progress meter
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index f5bf5c589..3e973bb85 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.11 1998/07/19 04:22:02 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.12 1998/07/21 05:33:19 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -26,7 +26,8 @@
// CacheGenerator::pkgCacheGenerator - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* We set the diry flag and make sure that is written to the disk */
-pkgCacheGenerator::pkgCacheGenerator(DynamicMMap &Map) : Map(Map), Cache(Map)
+pkgCacheGenerator::pkgCacheGenerator(DynamicMMap &Map,OpProgress &Prog) :
+ Map(Map), Cache(Map), Progress(Prog)
{
if (_error->PendingError() == true)
return;
@@ -71,6 +72,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List)
pkgCache::PkgIterator Pkg;
if (NewPackage(Pkg,PackageName) == false)
return false;
+ Progress.Progress(List.Offset());
/* Get a pointer to the version structure. We know the list is sorted
so we use that fact in the search. Insertion of new versions is
@@ -318,6 +320,8 @@ bool pkgCacheGenerator::SelectFile(string File,unsigned long Flags)
if (CurrentFile->FileName == 0)
return false;
+
+ Progress.SubProgress(Buf.st_size,File);
return true;
}
/*}}}*/