summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-03-14 15:08:52 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-03-14 15:08:52 +0100
commit8d6c583900b81bf996afd104571580c6f3e55e1c (patch)
tree2d4de028187a4d2eb9ffb380b47fb132afac4a84
parent196fd13629fc0f673b18735d633bdf69a3272590 (diff)
apt-pkg/acquire-item.{cc,h}: mark InRelease with Fail-Ignore to ensure the mirror methods does not retry on each mirror
-rw-r--r--apt-pkg/acquire-item.cc15
-rw-r--r--apt-pkg/acquire-item.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 497edbaac..6912eae87 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1538,6 +1538,21 @@ pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire *Owner, /*{{{*/
SigFile = DestFile;
}
/*}}}*/
+// pkgAcqMetaClearSig::Custom600Headers - Insert custom request headers /*{{{*/
+// ---------------------------------------------------------------------
+// FIXME: this can go away once the InRelease file is used widely
+string pkgAcqMetaClearSig::Custom600Headers()
+{
+ string Final = _config->FindDir("Dir::State::lists");
+ Final += URItoFileName(RealURI);
+
+ struct stat Buf;
+ if (stat(Final.c_str(),&Buf) != 0)
+ return "\nIndex-File: true\nFail-Ignore: true\n";
+
+ return "\nIndex-File: true\nFail-Ignore: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
+}
+ /*}}}*/
void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
{
if (AuthPass == false)
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 2ae7bf27c..f763577ee 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -854,6 +854,7 @@ class pkgAcqMetaClearSig : public pkgAcqMetaIndex
public:
void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
+ virtual string Custom600Headers();
/** \brief Create a new pkgAcqMetaClearSig. */
pkgAcqMetaClearSig(pkgAcquire *Owner,