summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorbubulle@debian.org <>2007-04-21 22:21:43 +0200
committerbubulle@debian.org <>2007-04-21 22:21:43 +0200
commitf6c03f1e14b0e37e8dd06c215b1ae6d5b0799c7b (patch)
tree559c186838d425e53a5b4c3fcbd2165bb4c6883f /apt-pkg/acquire-item.cc
parent72c52e774bb0564302617b8aec2f6e24215fd31d (diff)
parentbc50fc3013aa4454d10376888e4ccc24d35de334 (diff)
Merge with Michael
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 8ec4ba2c0..f566b16b8 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -183,6 +183,7 @@ string pkgAcqIndex::Custom600Headers()
void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
+
// no .bz2 found, retry with .gz
if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") {
Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz";
@@ -194,9 +195,15 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Complete = false;
Dequeue();
return;
+ }
+
+ // on decompression failure, remove bad versions in partial/
+ if(Decompression && Erase) {
+ string s = _config->FindDir("Dir::State::lists") + "partial/";
+ s += URItoFileName(RealURI);
+ unlink(s.c_str());
}
-
Item::Failed(Message,Cnf);
}