summaryrefslogtreecommitdiff
path: root/community/duplicity/duplicity-0.6.17-fix-memleak.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-23 23:15:06 +0000
committerroot <root@rshg054.dnsready.net>2012-01-23 23:15:06 +0000
commitc6c657b8bcf062b5d19eff6298b7754c11838080 (patch)
treeed6a14e27d40adfcc821fe921e95aa9e9ab4585b /community/duplicity/duplicity-0.6.17-fix-memleak.patch
parent164067832916c8e59219e1b0f30d7d04618a536e (diff)
Mon Jan 23 23:15:06 UTC 2012
Diffstat (limited to 'community/duplicity/duplicity-0.6.17-fix-memleak.patch')
-rw-r--r--community/duplicity/duplicity-0.6.17-fix-memleak.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/community/duplicity/duplicity-0.6.17-fix-memleak.patch b/community/duplicity/duplicity-0.6.17-fix-memleak.patch
new file mode 100644
index 000000000..1c4c8daff
--- /dev/null
+++ b/community/duplicity/duplicity-0.6.17-fix-memleak.patch
@@ -0,0 +1,29 @@
+=== modified file 'duplicity/util.py'
+--- duplicity/util.py 2011-08-23 18:14:17 +0000
++++ duplicity/util.py 2012-01-20 21:50:01 +0000
+@@ -71,6 +71,10 @@
+ else:
+ raise
+
++class BlackHoleList(list):
++ def append(self, x):
++ pass
++
+ class FakeTarFile:
+ debug = 0
+ def __iter__(self):
+@@ -83,7 +87,12 @@
+ # yet. So we want to ignore ReadError exceptions, which are used to signal
+ # this.
+ try:
+- return tarfile.TarFile("arbitrary", mode, fp)
++ tf = tarfile.TarFile("arbitrary", mode, fp)
++ # Now we cause TarFile to not cache TarInfo objects. It would end up
++ # consuming a lot of memory over the lifetime of our long-lasting
++ # signature files otherwise.
++ tf.members = BlackHoleList()
++ return tf
+ except tarfile.ReadError:
+ return FakeTarFile()
+
+