From a72ace2091afd833e9359514644676c6bca55d96 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:51:47 +0000 Subject: Minor Acquire cleanup Author: jgg Date: 1998-11-29 01:24:14 GMT Minor Acquire cleanup --- apt-pkg/acquire-item.cc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'apt-pkg/acquire-item.cc') 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 /*{{{*/ -- cgit v1.2.3