summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-02-10 17:55:13 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-02-10 18:07:50 +0100
commit34d6ece7566ea4fcda2286478b31641378aefc93 (patch)
tree79a4827a69b1ddc60878bf067369b33d59b8257f /apt-pkg
parent436bcfbb16ce558c228a3a6e29ad77c0c62664bc (diff)
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.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc9
1 files changed, 9 insertions, 0 deletions
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<pkgAcqIndexMergeDiffs *>::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)