From 0b844e23f014bd3ce95e27fe5fa81138e9ae4879 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 1 Oct 2014 17:13:33 +0200 Subject: hack around test-apt-update-unauth failure --- apt-pkg/acquire-item.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apt-pkg') 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"); } } /*}}}*/ -- cgit v1.2.3-70-g09d2