summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:23 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:23 +0000
commitb98f285980c3c2701539e196993ead268141aaeb (patch)
tree3e3859db916e6f9b3d56b341b91a2836ff5b4d51 /apt-pkg/acquire-item.cc
parent769f7e1ae907a499199c1f7a34124c1770f37176 (diff)
Almost done now
Author: jgg Date: 1998-11-11 06:54:13 GMT Almost done now
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index ce8c9d44c..d1233e887 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-item.cc,v 1.8 1998/11/09 01:09:19 jgg Exp $
+// $Id: acquire-item.cc,v 1.9 1998/11/11 06:54:13 jgg Exp $
/* ######################################################################
Acquire Item - Item to acquire
@@ -31,7 +31,7 @@
// ---------------------------------------------------------------------
/* */
pkgAcquire::Item::Item(pkgAcquire *Owner) : Owner(Owner), FileSize(0),
- Complete(false), QueueCounter(0)
+ Mode(0), ID(0), Complete(false), QueueCounter(0)
{
Owner->Add(this);
Status = StatIdle;
@@ -73,8 +73,16 @@ void pkgAcquire::Item::Start(string Message,unsigned long Size)
// Acquire::Item::Done - Item downloaded OK /*{{{*/
// ---------------------------------------------------------------------
/* */
-void pkgAcquire::Item::Done(string,unsigned long,string)
+void pkgAcquire::Item::Done(string Message,unsigned long Size,string)
{
+ // We just downloaded something..
+ string FileName = LookupTag(Message,"Filename");
+ if (Complete == false && FileName == DestFile)
+ {
+ if (Owner->Log != 0)
+ Owner->Log->Fetched(Size,atoi(LookupTag(Message,"Resume-Point","0").c_str()));
+ }
+
Status = StatDone;
ErrorText = string();
Owner->Dequeue(this);
@@ -186,6 +194,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string MD5)
DestFile += ".decomp";
Desc.URI = "copy:" + FileName;
QueueURI(Desc);
+ Mode = "copy";
return;
}
@@ -209,6 +218,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string MD5)
DestFile += ".decomp";
Desc.URI = "gzip:" + FileName,Location->PackagesInfo();
QueueURI(Desc);
+ Mode = "gzip";
}
/*}}}*/