summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-06-09 12:08:54 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-06-09 12:08:54 +0200
commite7aea3985734af1702fde6e2b0af90b992425334 (patch)
tree530e06b10af52c72585c66403f6016d0609996fa /apt-pkg
parent23c5897cbdb5a957788201a5178e963586dcdbc9 (diff)
parent2ac9b90b7b3ebeea9a2580b6f317f1dfefc8c8fe (diff)
merge lp:~mvo/apt/ubuntu-mirror-method-improvements
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc7
-rw-r--r--apt-pkg/acquire-item.h1
-rw-r--r--apt-pkg/acquire-method.cc1
-rw-r--r--apt-pkg/acquire-method.h1
-rw-r--r--apt-pkg/deb/dpkgpm.cc1
5 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index bb8a01db8..8973eedde 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -830,6 +830,13 @@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner,
{
}
/*}}}*/
+// AcqIndexTrans::Custom600Headers - Insert custom request headers /*{{{*/
+// ---------------------------------------------------------------------
+string pkgAcqIndexTrans::Custom600Headers()
+{
+ return "\nFail-Ignore: true";
+}
+ /*}}}*/
// AcqIndexTrans::Failed - Silence failure messages for missing files /*{{{*/
// ---------------------------------------------------------------------
/* */
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 332df5a6b..8f35c0dbf 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -579,6 +579,7 @@ class pkgAcqIndexTrans : public pkgAcqIndex
public:
virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
+ virtual string Custom600Headers();
/** \brief Create a pkgAcqIndexTrans.
*
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index 3008c8d1a..6e021a445 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -381,6 +381,7 @@ int pkgAcqMethod::Run(bool Single)
if (StrToTime(LookupTag(Message,"Last-Modified"),Tmp->LastModified) == false)
Tmp->LastModified = 0;
Tmp->IndexFile = StringToBool(LookupTag(Message,"Index-File"),false);
+ Tmp->FailIgnore = StringToBool(LookupTag(Message,"Fail-Ignore"),false);
Tmp->Next = 0;
// Append it to the list
diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h
index 99a4605b1..03851e823 100644
--- a/apt-pkg/acquire-method.h
+++ b/apt-pkg/acquire-method.h
@@ -37,6 +37,7 @@ class pkgAcqMethod
string DestFile;
time_t LastModified;
bool IndexFile;
+ bool FailIgnore;
};
struct FetchResult
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index c724c69a9..95e3bafdc 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <sys/select.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>