[duplicity] Add new patch and remove the old ones
Robert Scheck
robert at fedoraproject.org
Mon Dec 26 15:42:55 UTC 2011
commit 242ec95a69c3d03eeb35fdde4963261650a98523
Author: Robert Scheck <robert at fedoraproject.org>
Date: Mon Dec 26 16:42:45 2011 +0100
Add new patch and remove the old ones
duplicity-0.6.14-optparse_el4.patch | 1574 -----------------------------------
duplicity-0.6.14-python23.patch | 60 --
duplicity-0.6.17-python24.patch | 35 +
3 files changed, 35 insertions(+), 1634 deletions(-)
---
diff --git a/duplicity-0.6.17-python24.patch b/duplicity-0.6.17-python24.patch
new file mode 100644
index 0000000..1fcbcdd
--- /dev/null
+++ b/duplicity-0.6.17-python24.patch
@@ -0,0 +1,35 @@
+Patch by Robert Scheck <robert at fedoraproject.org> which makes duplicity >= 0.6.17 working by using the
+older Python 2.4, that doesn't support "as" and the "with" syntax. The bytestring conversion is a Python
+3 feature that has been backported to Python 2.6.
+
+--- duplicity-0.6.17/duplicity/backends/_boto_multi.py 2011-11-25 20:20:19.000000000 +0100
++++ duplicity-0.6.17/duplicity/backends/_boto_multi.py.python24 2011-12-26 14:07:07.000000000 +0100
+@@ -402,8 +402,11 @@
+
+ for mp in bucket.get_all_multipart_uploads():
+ if mp.id == multipart_id:
+- with FileChunkIO(filename, 'r', offset=offset * bytes, bytes=bytes) as fd:
++ fd = FileChunkIO(filename, 'r', offset=offset * bytes, bytes=bytes)
++ try:
+ mp.upload_part_from_file(fd, offset + 1, cb=_upload_callback)
++ finally:
++ fd.close()
+ break
+ except Exception, e:
+ traceback.print_exc()
+--- duplicity-0.6.17/duplicity/filechunkio.py 2011-11-25 20:20:19.000000000 +0100
++++ duplicity-0.6.17/duplicity/filechunkio.py.python24 2011-12-26 14:10:07.000000000 +0100
+@@ -77,9 +77,9 @@
+ n = len(data)
+ try:
+ b[:n] = data
+- except TypeError as err:
++ except TypeError, err:
+ import array
+ if not isinstance(b, array.array):
+ raise err
+- b[:n] = array.array(b'b', data)
+- return n
+\ No newline at end of file
++ b[:n] = array.array('b', data)
++ return n
More information about the scm-commits
mailing list