--- rdiff_backup/Main.py.orig Mon Aug 30 14:31:46 2004 +++ rdiff_backup/Main.py Mon Aug 30 14:31:53 2004 @@ -73,6 +73,7 @@ "remove-older-than=", "restore-as-of=", "restrict=", "restrict-read-only=", "restrict-update-only=", "server", "ssh-no-compression", "terminal-verbosity=", "test-server", + "print-abilities", "user-mapping-file=", "verbosity=", "version"]) except getopt.error, e: commandline_error("Bad commandline options: %s" % str(e)) @@ -143,6 +144,7 @@ Globals.set('chars_to_quote', arg) elif opt == "--parsable-output": Globals.set('parsable_output', 1) elif opt == "--print-statistics": Globals.set('print_statistics', 1) + elif opt == "--print-abilities": Globals.set('print_abilities', 1) elif opt == "-r" or opt == "--restore-as-of": restore_timestr, action = arg, "restore-as-of" elif opt == "--remote-cmd": remote_cmd = arg @@ -397,10 +399,12 @@ rpout.conn.Globals.set_local(conn_attr, 1) src_fsa = rpin.conn.fs_abilities.get_fsabilities_readonly('source', rpin) - Log(str(src_fsa), 3) + if Globals.print_abilities: + Log(str(src_fsa), 3) dest_fsa = rpout.conn.fs_abilities.get_fsabilities_readwrite( 'destination', Globals.rbdir, 1, Globals.chars_to_quote) - Log(str(dest_fsa), 3) + if Globals.print_abilities: + Log(str(dest_fsa), 3) update_triple(src_fsa.eas, dest_fsa.eas, ('eas_active', 'eas_write', 'eas_conn')) @@ -503,10 +507,12 @@ target_fsa = target.conn.fs_abilities.get_fsabilities_readwrite( 'destination', target, 0, Globals.chars_to_quote) - Log(str(target_fsa), 3) + if Globals.print_abilities: + Log(str(target_fsa), 3) mirror_fsa = Globals.rbdir.conn.fs_abilities.get_fsabilities_restoresource( Globals.rbdir) - Log(str(mirror_fsa), 3) + if Globals.print_abilities: + Log(str(mirror_fsa), 3) update_triple(mirror_fsa.eas, target_fsa.eas, ('eas_active', 'eas_write', 'eas_conn')) @@ -688,7 +694,8 @@ rbdir.conn.Globals.set_local(conn_attr, 1) fsa = rbdir.conn.fs_abilities.get_fsabilities_readwrite('archive', rbdir, 1, Globals.chars_to_quote) - Log(str(fsa), 3) + if Globals.print_abilities: + Log(str(fsa), 3) update_triple(fsa.eas, ('eas_active', 'eas_write', 'eas_conn')) update_triple(fsa.acls, ('acls_active', 'acls_write', 'acls_conn')) --- rdiff-backup.1.orig Mon Aug 30 14:52:05 2004 +++ rdiff-backup.1 Mon Aug 30 14:54:13 2004 @@ -285,6 +285,11 @@ .B STATISTICS section for more information. .TP +.B --print-abilities +If set, file-system abilities will be printed at the beginning of +backup, restore, and remove operations. +If not set, this information will be suppressed. +.TP .BI "-r, --restore-as-of " restore_time Restore the specified directory as it was as of .IR restore_time . --- rdiff_backup/Globals.py.orig Mon Aug 30 15:49:44 2004 +++ rdiff_backup/Globals.py Mon Aug 30 15:49:25 2004 @@ -180,6 +180,9 @@ # If true, print statistics after successful backup print_statistics = None +# If true, print file-system abilities at beginning of run +print_abilities = None + # Controls whether file_statistics file is written in # rdiff-backup-data dir. These can sometimes take up a lot of space. file_statistics = 1 --- rdiff_backup/fs_abilities.py.orig Mon Aug 30 15:52:00 2004 +++ rdiff_backup/fs_abilities.py Mon Aug 30 15:53:29 2004 @@ -272,7 +272,8 @@ assert rp.lstat() try: import posix1e except ImportError: - log.Log("Unable to import module posix1e from pylibacl " + if Globals.print_abilities: + log.Log("Unable to import module posix1e from pylibacl " "package.\nACLs not supported on filesystem at %s" % (rp.path,), 4) self.acls = 0 @@ -280,7 +281,8 @@ try: posix1e.ACL(file=rp.path) except IOError, exc: - log.Log("ACLs appear not to be supported by " + if Globals.print_abilities: + log.Log("ACLs appear not to be supported by " "filesystem at %s" % (rp.path,), 4) self.acls = 0 else: self.acls = 1 @@ -291,7 +293,8 @@ assert rp.lstat() try: import xattr except ImportError: - log.Log("Unable to import module xattr.\nExtended attributes not " + if Globals.print_abilities: + log.Log("Unable to import module xattr.\nExtended attributes not " "supported on filesystem at %s" % (rp.path,), 4) self.eas = 0 return @@ -302,7 +305,8 @@ xattr.setxattr(rp.path, "user.test", "test val") assert xattr.getxattr(rp.path, "user.test") == "test val" except IOError, exc: - log.Log("Extended attributes not supported by " + if Globals.print_abilities: + log.Log("Extended attributes not supported by " "filesystem at %s" % (rp.path,), 4) self.eas = 0 else: self.eas = 1