summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:47 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:47 +0000
commita72ace2091afd833e9359514644676c6bca55d96 (patch)
tree9a0d5ae9403e7d5ef36cbe965a5e8fc95b587738 /apt-pkg/acquire-item.cc
parent2662c370aa734419fd561342b7b57f338dc159e6 (diff)
Minor Acquire cleanup
Author: jgg Date: 1998-11-29 01:24:14 GMT Minor Acquire cleanup
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index cfd0e5d02..db334de98 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.13 1998/11/22 03:20:30 jgg Exp $
+// $Id: acquire-item.cc,v 1.14 1998/11/29 01:24:14 jgg Exp $
/* ######################################################################
Acquire Item - Item to acquire
@@ -56,6 +56,16 @@ void pkgAcquire::Item::Failed(string Message)
Status = StatIdle;
if (QueueCounter <= 1)
{
+ /* This indicates that the file is not available right now but might
+ be sometime later. If we do a retry cycle then this should be
+ retried */
+ if (StringToBool(LookupTag(Message,"Transient-Failure"),false) == true)
+ {
+ Status = StatIdle;
+ Owner->Dequeue(this);
+ return;
+ }
+
ErrorText = LookupTag(Message,"Message");
Status = StatError;
Owner->Dequeue(this);
@@ -147,9 +157,9 @@ string pkgAcqIndex::Custom600Headers()
struct stat Buf;
if (stat(Final.c_str(),&Buf) != 0)
- return string();
+ return "\nIndex-File: true";
- return "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
+ return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
/*}}}*/
// AcqIndex::Done - Finished a fetch /*{{{*/
@@ -267,9 +277,9 @@ string pkgAcqIndexRel::Custom600Headers()
struct stat Buf;
if (stat(Final.c_str(),&Buf) != 0)
- return string();
+ return "\nIndex-File: true";
- return "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
+ return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
/*}}}*/
// AcqIndexRel::Done - Item downloaded OK /*{{{*/