diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:37 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:37 +0000 |
commit | d568ed2d3ba5d7d05e4381ee59468a124309f152 (patch) | |
tree | e53651d00527dea8ad5427361670dbc9293645ca /apt-pkg/acquire.cc | |
parent | d38b7b3d803a719b189df80820aeda6a818f4909 (diff) |
Item done counters
Author: jgg
Date: 1998-11-23 07:32:19 GMT
Item done counters
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r-- | apt-pkg/acquire.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 3bd7662fd..f9691df9c 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire.cc,v 1.17 1998/11/22 23:37:03 jgg Exp $ +// $Id: acquire.cc,v 1.18 1998/11/23 07:32:19 jgg Exp $ /* ###################################################################### Acquire - File Acquiration @@ -612,6 +612,8 @@ void pkgAcquireStatus::Pulse(pkgAcquire *Owner) { TotalBytes = 0; CurrentBytes = 0; + TotalItems = 0; + CurrentItems = 0; // Compute the total number of bytes to fetch unsigned int Unknown = 0; @@ -619,6 +621,10 @@ void pkgAcquireStatus::Pulse(pkgAcquire *Owner) for (pkgAcquire::Item **I = Owner->ItemsBegin(); I != Owner->ItemsEnd(); I++, Count++) { + TotalItems++; + if ((*I)->Status == pkgAcquire::Item::StatDone) + CurrentItems++; + // Totally ignore local items if ((*I)->Local == true) continue; @@ -685,6 +691,8 @@ void pkgAcquireStatus::Start() TotalBytes = 0; FetchedBytes = 0; ElapsedTime = 0; + TotalItems = 0; + CurrentItems = 0; } /*}}}*/ // AcquireStatus::Stop - Finished downloading /*{{{*/ |