summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.h5
-rw-r--r--apt-pkg/acquire-worker.cc17
-rw-r--r--apt-pkg/acquire.cc4
-rw-r--r--apt-pkg/acquire.h5
4 files changed, 23 insertions, 8 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 459d7d26d..bf1a50e75 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-item.h,v 1.23 2000/01/17 07:11:49 jgg Exp $
+// $Id: acquire-item.h,v 1.24 2000/01/27 04:15:09 jgg Exp $
/* ######################################################################
Acquire Item - Item to acquire
@@ -71,7 +71,8 @@ class pkgAcquire::Item
// Inquire functions
virtual string MD5Sum() {return string();};
-
+ pkgAcquire *GetOwner() {return Owner;};
+
Item(pkgAcquire *Owner);
virtual ~Item();
};
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 40092d5d6..97a7fbb77 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-worker.cc,v 1.29 2000/01/17 07:11:49 jgg Exp $
+// $Id: acquire-worker.cc,v 1.30 2000/01/27 04:15:09 jgg Exp $
/* ######################################################################
Acquire Worker
@@ -233,6 +233,10 @@ bool pkgAcquire::Worker::RunMessages()
ResumePoint = atoi(LookupTag(Message,"Resume-Point","0").c_str());
Itm->Owner->Start(Message,atoi(LookupTag(Message,"Size","0").c_str()));
+ // Display update before completion
+ if (Log != 0 && Log->MorePulses == true)
+ Log->Pulse(Itm->Owner->GetOwner());
+
if (Log != 0)
Log->Fetch(*Itm);
@@ -247,9 +251,14 @@ bool pkgAcquire::Worker::RunMessages()
_error->Error("Method gave invalid 201 URI Done message");
break;
}
-
+
pkgAcquire::Item *Owner = Itm->Owner;
pkgAcquire::ItemDesc Desc = *Itm;
+
+ // Display update before completion
+ if (Log != 0 && Log->MorePulses == true)
+ Log->Pulse(Owner->GetOwner());
+
OwnerQ->ItemDone(Itm);
if (TotalSize != 0 &&
(unsigned)atoi(LookupTag(Message,"Size","0").c_str()) != TotalSize)
@@ -286,6 +295,10 @@ bool pkgAcquire::Worker::RunMessages()
break;
}
+ // Display update before completion
+ if (Log != 0 && Log->MorePulses == true)
+ Log->Pulse(Itm->Owner->GetOwner());
+
pkgAcquire::Item *Owner = Itm->Owner;
pkgAcquire::ItemDesc Desc = *Itm;
OwnerQ->ItemDone(Itm);
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index da3160cae..428bfd50f 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.45 2000/01/17 07:11:49 jgg Exp $
+// $Id: acquire.cc,v 1.46 2000/01/27 04:15:09 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
@@ -706,7 +706,7 @@ void pkgAcquire::Queue::Bump()
// AcquireStatus::pkgAcquireStatus - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgAcquireStatus::pkgAcquireStatus()
+pkgAcquireStatus::pkgAcquireStatus() : Update(true), MorePulses(false)
{
Start();
}
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index 5565ad3ac..de1474f56 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.26 2000/01/17 07:11:49 jgg Exp $
+// $Id: acquire.h,v 1.27 2000/01/27 04:15:09 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
@@ -253,7 +253,8 @@ class pkgAcquireStatus
public:
bool Update;
-
+ bool MorePulses;
+
// Called by items when they have finished a real download
virtual void Fetched(unsigned long Size,unsigned long ResumePoint);