From 9b322f72038dfdd2b848f997b1515f75e4bf0f9a Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Jun 28 2008 09:08:26 +0000 Subject: Added patch for incremental backups using python 2.3 (#453069) --- diff --git a/duplicity-0.4.11-python23.patch b/duplicity-0.4.11-python23.patch index 178de05..b31cdf4 100644 --- a/duplicity-0.4.11-python23.patch +++ b/duplicity-0.4.11-python23.patch @@ -1,6 +1,10 @@ Patch by Robert Scheck to get duplicity >= 0.4.11 building with older Python 2.3 again. This release done by Kenneth Loafman luckily -got Python 2.3 support back. +got Python 2.3 support back. Second part of the patch replaces the use of functionality of +Python >= 2.4 functions. For further information, see: + + - http://lists.gnu.org/archive/html/duplicity-talk/2008-05/msg00036.html + - https://bugzilla.redhat.com/show_bug.cgi?id=453069 --- duplicity-0.4.11/setup.py 2008-05-05 16:40:53.000000000 +0200 +++ duplicity-0.4.11/setup.py.python23 2008-05-05 21:45:35.000000000 +0200 @@ -15,3 +19,28 @@ got Python 2.3 support back. sys.exit(1) try: +--- duplicity-0.4.11/src/collections.py 2008-05-05 16:40:53.000000000 +0200 ++++ duplicity-0.4.11/src/collections.py.python23 2008-06-28 10:53:35.000000000 +0200 +@@ -789,6 +789,10 @@ + NOTE: n = 1 -> time of latest available chain (n = 0 is not + a valid input). Thus the second-to-last is obtained with n=2 + rather than n=1.""" ++ ++ def mycmp(x, y): ++ return cmp(x.get_first().time, y.get_first().time) ++ + assert self.values_set + assert n > 0 + +@@ -796,9 +800,9 @@ + return None + + sorted = self.all_backup_chains[:] +- sorted.sort(reverse = True, +- key = lambda chain: chain.get_first().time) ++ sorted.sort(mycmp) + ++ sorted.reverse() + return sorted[n - 1] + + def get_older_than(self, t): diff --git a/duplicity.spec b/duplicity.spec index 4bc5eb6..73dde2d 100644 --- a/duplicity.spec +++ b/duplicity.spec @@ -3,7 +3,7 @@ Summary: Encrypted bandwidth-efficient backup using rsync algorithm Name: duplicity Version: 0.4.11 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: Applications/Archiving URL: http://www.nongnu.org/duplicity/ @@ -51,6 +51,9 @@ rm -rf $RPM_BUILD_ROOT %{python_sitearch}/%{name}* %changelog +* Sat Jun 28 2008 Robert Scheck 0.4.11-2 +- Added patch for incremental backups using python 2.3 (#453069) + * Mon May 05 2008 Robert Scheck 0.4.11-1 - Upgrade to 0.4.11 (#440346)