summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:37 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:37 +0000
commitd568ed2d3ba5d7d05e4381ee59468a124309f152 (patch)
treee53651d00527dea8ad5427361670dbc9293645ca /apt-pkg
parentd38b7b3d803a719b189df80820aeda6a818f4909 (diff)
Item done counters
Author: jgg Date: 1998-11-23 07:32:19 GMT Item done counters
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire.cc10
-rw-r--r--apt-pkg/acquire.h4
-rw-r--r--apt-pkg/deb/dpkgpm.cc4
3 files changed, 14 insertions, 4 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 /*{{{*/
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index acfbb3ead..8bdcb8bb2 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire.h,v 1.13 1998/11/14 01:39:46 jgg Exp $
+// $Id: acquire.h,v 1.14 1998/11/23 07:32:20 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
@@ -199,6 +199,8 @@ class pkgAcquireStatus
unsigned long TotalBytes;
unsigned long FetchedBytes;
unsigned long ElapsedTime;
+ unsigned long TotalItems;
+ unsigned long CurrentItems;
public:
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index e437ad7a3..228e45c48 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: dpkgpm.cc,v 1.3 1998/11/23 07:03:11 jgg Exp $
+// $Id: dpkgpm.cc,v 1.4 1998/11/23 07:32:21 jgg Exp $
/* ######################################################################
DPKG Package Manager - Provide an interface to dpkg
@@ -193,7 +193,7 @@ bool pkgDPkgPM::Go()
/* No Job Control Stop Env is a magic dpkg var that prevents it
from using sigstop */
setenv("DPKG_NO_TSTP","yes",1);
- execvp("dpkg",(char **)Args);
+ execvp(Args[0],(char **)Args);
cerr << "Could not exec dpkg!" << endl;
exit(100);
}