summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2007-05-02 13:54:10 +0200
committerMichael Vogt <egon@bottom>2007-05-02 13:54:10 +0200
commit8171c75b9939a13aa22a3f45d436a6305af561ff (patch)
tree2bd4f97cb013b56642a845873f54d49f94b92e51 /apt-pkg/acquire-item.cc
parent3bc9f25de62f59cf5d4f90d1c1aaccc9ba23439b (diff)
parent3036f1e491ec1c71fb8fe9ff35954cebb2574320 (diff)
* merged with the apt--mvo branch
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 020047c06..3fd2304d2 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -606,6 +606,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";
@@ -617,9 +618,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);
}