[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Solving rdiff-backup bug in Squeeze



Hi,

The rdiff-backup version currently in Squeeze triggers an annoying Python deprecation warning message in some situations (bug #587370). A patch to solve this issue has been integrated in Ubuntu for some time and it also works for the Debian package pretty well. Would you consider the following debdiff to integrate this patch to the rdiff-backup package in Squeeze for the coming point release?

Bye,
Carl Chenet
diff -u rdiff-backup-1.2.8/debian/changelog rdiff-backup-1.2.8/debian/changelog
--- rdiff-backup-1.2.8/debian/changelog
+++ rdiff-backup-1.2.8/debian/changelog
@@ -1,3 +1,10 @@
+rdiff-backup (1.2.8-7) stable; urgency=low
+
+  [ Carl Chenet]
+  * added patch from Ubuntu for Python 2.6 deprecation (Closes: #587370) 
+
+ -- Carl Chenet <chaica@ohmytux.com>  Sat, 12 Mar 2011 13:41:08 +0100
+
 rdiff-backup (1.2.8-6) unstable; urgency=low
 
   * debian/control
diff -u rdiff-backup-1.2.8/debian/patches/00list rdiff-backup-1.2.8/debian/patches/00list
--- rdiff-backup-1.2.8/debian/patches/00list
+++ rdiff-backup-1.2.8/debian/patches/00list
@@ -1,0 +2 @@
+02_python_2.6_deprecationwarning.dpatch
only in patch2:
unchanged:
--- rdiff-backup-1.2.8.orig/debian/patches/02_python_2.6_deprecationwarning.dpatch
+++ rdiff-backup-1.2.8/debian/patches/02_python_2.6_deprecationwarning.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_python_2.6_deprecationwarning.dpatch by <andreas@pc13267v15.midgard.liu.se>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Suppress warnings in logs
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' rdiff-backup-1.2.8~/rdiff_backup/SetConnections.py rdiff-backup-1.2.8/rdiff_backup/SetConnections.py
+--- rdiff-backup-1.2.8~/rdiff_backup/SetConnections.py	2009-03-16 15:36:21.000000000 +0100
++++ rdiff-backup-1.2.8/rdiff_backup/SetConnections.py	2011-03-12 12:37:51.000000000 +0100
+@@ -135,10 +135,10 @@
+ 	if not remote_cmd: return Globals.local_connection
+ 
+ 	Log("Executing " + remote_cmd, 4)
+-	if os.name == "nt":
++	if map(int, sys.version.split()[0].split('.')[:2]) >= [2, 6]:
+ 		import subprocess
+ 		try:
+-			process = subprocess.Popen(remote_cmd, shell=False, bufsize=0,
++			process = subprocess.Popen(remote_cmd, shell=True, bufsize=0,
+ 								stdin=subprocess.PIPE, 
+ 								stdout=subprocess.PIPE)
+ 			(stdin, stdout) = (process.stdin, process.stdout)

Reply to: