diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-10-01 17:13:33 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-10-01 17:13:33 +0200 |
commit | 0b844e23f014bd3ce95e27fe5fa81138e9ae4879 (patch) | |
tree | 7678ea3fdb4fe35402a710535e837e68bfba7b38 /apt-pkg/acquire-item.cc | |
parent | 8beef749860d99fd21ea15852aad7716dd7b741b (diff) |
hack around test-apt-update-unauth failure
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 4ab4ef6a1..fd2ea08f8 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1192,6 +1192,8 @@ void pkgAcqIndex::Done(string Message, unsigned long long Size, // FIXME: can we void the "Erase" bool here as its very non-local? std::string CompressedFile = _config->FindDir("Dir::State::lists") + "partial/"; CompressedFile += URItoFileName(RealURI); + if(_config->FindB("Acquire::GzipIndexes",false) == false) + CompressedFile += '.' + compExt; // Remove the compressed version. if (Erase == true) @@ -1399,6 +1401,13 @@ void pkgAcqMetaBase::AbortTransaction() // the transaction will abort, so stop anything that is idle if ((*I)->Status == pkgAcquire::Item::StatIdle) (*I)->Status = pkgAcquire::Item::StatDone; + + // kill files in partial + string PartialFile = _config->FindDir("Dir::State::lists"); + PartialFile += "partial/"; + PartialFile += flNotDir((*I)->DestFile); + if(FileExists(PartialFile)) + Rename(PartialFile, PartialFile + ".FAILED"); } } /*}}}*/ |