summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-method.cc
diff options
context:
space:
mode:
authorIshan Jayawardena <udeshike@gmail.com>2011-06-13 15:16:14 +0530
committerIshan Jayawardena <udeshike@gmail.com>2011-06-13 15:16:14 +0530
commit9995c4a0bc2d8567ff9f11d338ad610754682372 (patch)
tree8c365793c339382270c998dcd8395dc3a4471943 /apt-pkg/acquire-method.cc
parentb8b21ea0d77e70b08948a594c6741252a39a6ca2 (diff)
added support for downloading debdelta files and queuing successfully downloaded debdeltas for processing with the debdelta apt method, in apt-pkg/acquire-item.{cc,h} in pkgAcqArchive class. Currently, no index for deltas are used. Proper progress reporting and methods to verify the debdeltas are yet to be added.
Diffstat (limited to 'apt-pkg/acquire-method.cc')
-rw-r--r--apt-pkg/acquire-method.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index e9e102488..eb1e003c2 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -323,13 +323,12 @@ int pkgAcqMethod::Run(bool Single)
if (Single == true && Messages.empty() == true)
return -1;
- string Message = Messages.front();
+ string m = Messages.front();
Messages.erase(Messages.begin());
-
// Fetch the message number
char *End;
- int Number = strtol(Message.c_str(),&End,10);
- if (End == Message.c_str())
+ int Number = strtol(m.c_str(),&End,10);
+ if (End == m.c_str())
{
cerr << "Malformed message!" << endl;
return 100;
@@ -338,20 +337,19 @@ int pkgAcqMethod::Run(bool Single)
switch (Number)
{
case 601:
- if (Configuration(Message) == false)
- return 100;
+ if (Configuration(m) == false)
+ return 100;
break;
case 600:
{
FetchItem *Tmp = new FetchItem;
-
- Tmp->Uri = LookupTag(Message,"URI");
- Tmp->DestFile = LookupTag(Message,"FileName");
- if (RFC1123StrToTime(LookupTag(Message,"Last-Modified").c_str(),Tmp->LastModified) == false)
+ Tmp->Uri = LookupTag(m,"URI");
+ Tmp->DestFile = LookupTag(m,"FileName");
+ if (RFC1123StrToTime(LookupTag(m,"Last-Modified").c_str(),Tmp->LastModified) == false)
Tmp->LastModified = 0;
- Tmp->IndexFile = StringToBool(LookupTag(Message,"Index-File"),false);
- Tmp->FailIgnore = StringToBool(LookupTag(Message,"Fail-Ignore"),false);
+ Tmp->IndexFile = StringToBool(LookupTag(m,"Index-File"),false);
+ Tmp->FailIgnore = StringToBool(LookupTag(m,"Fail-Ignore"),false);
Tmp->Next = 0;
// Append it to the list