summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-02-21 08:08:18 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2006-02-21 08:08:18 +0000
commita4977aac2bc7999f805550e3bcd5fe49958fe128 (patch)
tree26b08c729d1e41a6cc4f0623d870b0b325805a53 /apt-pkg
parent9ceaa28f2ce0bde0cbf6f73a32a68761ec85f11d (diff)
parent0c1b7be9c1a30fddd72d5b80bb2e566fe379b166 (diff)
* merged with apt--mvo
Patches applied: * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-134 * only remove the sigfile if pkgAcqMetaSig::Failed() didn't fail for a network error * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-135 tyop
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 86f61dd00..1fa929aad 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -340,12 +340,6 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
// File was already in place. It needs to be re-verified
// because Release might have changed, so Move it into partial
Rename(Final,DestFile);
- // unlink the file and do not try to use I-M-S and Last-Modified
- // if the users proxy is broken
- if(_config->FindB("Acquire::BrokenProxy", false) == true) {
- std::cerr << "forcing re-get of the signature file as requested" << std::endl;
- unlink(DestFile.c_str());
- }
}
QueueURI(Desc);
@@ -395,18 +389,19 @@ void pkgAcqMetaSig::Done(string Message,unsigned long Size,string MD5,
/*}}}*/
void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
- // Delete any existing sigfile, so that this source isn't
- // mistakenly trusted
- string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
- unlink(Final.c_str());
- // if we get a timeout if fail
+ // if we get a network error we fail gracefully
if(LookupTag(Message,"FailReason") == "Timeout" ||
- LookupTag(Message,"FailReason") == "TmpResolveFailure") {
+ LookupTag(Message,"FailReason") == "TmpResolveFailure" ||
+ LookupTag(Message,"FailReason") == "ConnectionRefused") {
Item::Failed(Message,Cnf);
return;
}
+ // Delete any existing sigfile when the acquire failed
+ string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
+ unlink(Final.c_str());
+
// queue a pkgAcqMetaIndex with no sigfile
new pkgAcqMetaIndex(Owner, MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,
"", IndexTargets, MetaIndexParser);