]> git.saurik.com Git - apt.git/commitdiff
apt-pkg/acquire-item.{cc,h}: mark InRelease with Fail-Ignore to ensure the mirror...
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 14 Mar 2011 14:08:52 +0000 (15:08 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 14 Mar 2011 14:08:52 +0000 (15:08 +0100)
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h

index 497edbaacc40e8a43362536662ed28c0709f0b26..6912eae87b83f15e7f78be68f7bcfc34f378178f 100644 (file)
@@ -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)
index 2ae7bf27c4665687f9d3eecfdeabd7ee3b88c3d8..f763577ee8ee11eacd0d60bfaff172c9f533e9a2 100644 (file)
@@ -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,