[Python-apps-commits] r3669 - in packages/rdiff-backup/trunk/debian (3 files)
chaica-guest at users.alioth.debian.org
chaica-guest at users.alioth.debian.org
Wed Sep 2 20:38:33 UTC 2009
Date: Wednesday, September 2, 2009 @ 20:38:32
Author: chaica-guest
Revision: 3669
forgot to 'svn add' the following files :
debian/patches
debian/patches/01_fix_restricted_test-server_option.dpatch
debian/patches/00list
Added:
packages/rdiff-backup/trunk/debian/patches/
packages/rdiff-backup/trunk/debian/patches/00list
packages/rdiff-backup/trunk/debian/patches/01_fix_restricted_test-server_option.dpatch
Added: packages/rdiff-backup/trunk/debian/patches/00list
===================================================================
--- packages/rdiff-backup/trunk/debian/patches/00list (rev 0)
+++ packages/rdiff-backup/trunk/debian/patches/00list 2009-09-02 20:38:32 UTC (rev 3669)
@@ -0,0 +1 @@
+01_fix_restricted_test-server_option.dpatch
Added: packages/rdiff-backup/trunk/debian/patches/01_fix_restricted_test-server_option.dpatch
===================================================================
--- packages/rdiff-backup/trunk/debian/patches/01_fix_restricted_test-server_option.dpatch (rev 0)
+++ packages/rdiff-backup/trunk/debian/patches/01_fix_restricted_test-server_option.dpatch 2009-09-02 20:38:32 UTC (rev 3669)
@@ -0,0 +1,54 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_fix_restricted_test-server_option.dpatch by <andreas at arrakis.se>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Makes --test-server and --restrict work together again.
+## DP: Taken from http://lists.nongnu.org/archive/html/rdiff-backup-commits/2009-03/msg00023.html
+## DP: and from https://bugs.launchpad.net/ubuntu/+source/rdiff-backup/+bug/349072/comments/17
+
+ at DPATCH@
+diff -urNad rdiff-backup-1.2.8~/rdiff_backup/Main.py rdiff-backup-1.2.8/rdiff_backup/Main.py
+--- rdiff-backup-1.2.8~/rdiff_backup/Main.py 2009-03-03 03:29:55.000000000 +0100
++++ rdiff-backup-1.2.8/rdiff_backup/Main.py 2009-04-01 23:45:34.000000000 +0200
+@@ -288,7 +288,7 @@
+ elif action == "remove-older-than": RemoveOlderThan(rps[0])
+ elif action == "restore": Restore(*rps)
+ elif action == "restore-as-of": Restore(rps[0], rps[1], 1)
+- elif action == "test-server": SetConnections.TestConnections()
++ elif action == "test-server": SetConnections.TestConnections(rps)
+ elif action == "verify": Verify(rps[0])
+ else: raise AssertionError("Unknown action " + action)
+
+diff -urNad 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-03 03:29:55.000000000 +0100
++++ rdiff-backup-1.2.8/rdiff_backup/SetConnections.py 2009-04-01 23:45:40.000000000 +0200
+@@ -241,19 +241,24 @@
+ Globals.backup_reader = Globals.isbackup_reader = \
+ Globals.backup_writer = Globals.isbackup_writer = None
+
+-def TestConnections():
++def TestConnections(rpaths):
+ """Test connections, printing results"""
+ if len(Globals.connections) == 1: print "No remote connections specified"
+ else:
+- for i in range(1, len(Globals.connections)): test_connection(i)
++ assert len(Globals.connections) == len(rpaths) + 1
++ for i in range(1, len(Globals.connections)):
++ test_connection(i, rpaths[i-1])
+
+-def test_connection(conn_number):
++def test_connection(conn_number, rp):
+ """Test connection. conn_number 0 is the local connection"""
+ print "Testing server started by: ", __conn_remote_cmds[conn_number]
+ conn = Globals.connections[conn_number]
+ try:
+ assert conn.Globals.get('current_time') is None
+- assert type(conn.os.listdir('.')) is list
++ try:
++ assert type(conn.os.getuid()) is int
++ except AttributeError: # Windows doesn't support os.getuid()
++ assert type(conn.os.listdir(rp.path)) is list
+ version = conn.Globals.get('version')
+ except:
+ sys.stderr.write("Server tests failed\n")
+
More information about the Python-apps-commits
mailing list