From 34d6ece7566ea4fcda2286478b31641378aefc93 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 10 Feb 2014 17:55:13 +0100 Subject: always cleanup patchfiles at the end of rred call With APT::Get::List-Cleanup disabled the ed-style patch files are lingering in the lists/ directory otherwise. That was kinda okay in the old none-client-merge as the filename was always the same so it was constantly overridden, but now with different names for client-merge quiet a few could pill up on the system and are used by the next call as it picks them up based on the filename. --- 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 1185908f3..60003c023 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -757,6 +757,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size,string Md5Has { // remove the just applied patch available_patches.erase(available_patches.begin()); + unlink((FinalFile + ".ed").c_str()); // move into place if(Debug) @@ -887,6 +888,14 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,string M // otherwise lists cleanup will eat the file DestFile = FinalFile; + // ensure the ed's are gone regardless of list-cleanup + for (std::vector::const_iterator I = allPatches->begin(); + I != allPatches->end(); ++I) + { + std::string patch = FinalFile + ".ed." + (*I)->patch.file + ".gz"; + unlink(patch.c_str()); + } + // all set and done Complete = true; if(Debug) -- cgit v1.2.3