rdiff-backup-commits
[Top][All Lists]
Advanced

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

[Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/eas_acls.py..


From: Andrew Ferguson
Subject: [Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/eas_acls.py...
Date: Sat, 27 Sep 2008 00:08:31 +0000

CVSROOT:        /sources/rdiff-backup
Module name:    rdiff-backup
Changes by:     Andrew Ferguson <owsla> 08/09/27 00:08:31

Modified files:
        .              : CHANGELOG 
        rdiff_backup   : eas_acls.py rpath.py 

Log message:
        Support extended attributes on symbolic links

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/CHANGELOG?cvsroot=rdiff-backup&r1=1.304&r2=1.305
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/eas_acls.py?cvsroot=rdiff-backup&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/rpath.py?cvsroot=rdiff-backup&r1=1.127&r2=1.128

Patches:
Index: CHANGELOG
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/CHANGELOG,v
retrieving revision 1.304
retrieving revision 1.305
diff -u -b -r1.304 -r1.305
--- CHANGELOG   26 Sep 2008 23:13:18 -0000      1.304
+++ CHANGELOG   27 Sep 2008 00:08:30 -0000      1.305
@@ -1,6 +1,8 @@
 New in v1.2.2 (????/??/??)
 ---------------------------
 
+Support extended attributes on symbolic links. (Andrew Ferguson)
+
 On Mac OS X, read the com.apple.FinderInfo extended attribute since it is the
 only storage location for the 'busy' (Z) Finder attribute. (Andrew Ferguson)
 

Index: rdiff_backup/eas_acls.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/eas_acls.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- rdiff_backup/eas_acls.py    26 Sep 2008 23:13:18 -0000      1.36
+++ rdiff_backup/eas_acls.py    27 Sep 2008 00:08:31 -0000      1.37
@@ -56,7 +56,7 @@
 
        def read_from_rp(self, rp):
                """Set the extended attributes from an rpath"""
-               try: attr_list = rp.conn.xattr.listxattr(rp.path)
+               try: attr_list = rp.conn.xattr.listxattr(rp.path, rp.issym())
                except IOError, exc:
                        if exc[0] in (errno.EOPNOTSUPP, errno.EPERM, 
errno.ETXTBSY):
                                return # if not supported, consider empty
@@ -71,7 +71,7 @@
                        if not rp.isdir() and attr == 'com.apple.ResourceFork':
                                # Resource Fork handled elsewhere, except for 
directories
                                continue
-                       try: self.attr_dict[attr] = 
rp.conn.xattr.getxattr(rp.path, attr)
+                       try: self.attr_dict[attr] = 
rp.conn.xattr.getxattr(rp.path, attr, rp.issym())
                        except IOError, exc:
                                # File probably modified while reading, just 
continue
                                if exc[0] == errno.ENODATA: continue
@@ -81,9 +81,9 @@
        def clear_rp(self, rp):
                """Delete all the extended attributes in rpath"""
                try:
-                       for name in rp.conn.xattr.listxattr(rp.path):
+                       for name in rp.conn.xattr.listxattr(rp.path, 
rp.issym()):
                                try:
-                                       rp.conn.xattr.removexattr(rp.path, name)
+                                       rp.conn.xattr.removexattr(rp.path, 
name, rp.issym())
                                except IOError, exc:
                                        # SELinux attributes cannot be removed, 
and we don't want
                                        # to bail out or be too noisy at low 
log levels.
@@ -106,7 +106,7 @@
                self.clear_rp(rp)
                for (name, value) in self.attr_dict.iteritems():
                        try:
-                               rp.conn.xattr.setxattr(rp.path, name, value)
+                               rp.conn.xattr.setxattr(rp.path, name, value, 0, 
rp.issym())
                        except IOError, exc:
                                # Mac and Linux attributes have different 
namespaces, so
                                # fail gracefully if can't call setxattr
@@ -580,7 +580,7 @@
 
        """
        ea = ExtendedAttributes(rp.index)
-       if not rp.issym() and not rp.issock() and not rp.isfifo():
+       if not rp.issock() and not rp.isfifo():
                ea.read_from_rp(rp)
        return ea
 rpath.ea_get = rpath_ea_get

Index: rdiff_backup/rpath.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/rpath.py,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -b -r1.127 -r1.128
--- rdiff_backup/rpath.py       26 Sep 2008 23:13:18 -0000      1.127
+++ rdiff_backup/rpath.py       27 Sep 2008 00:08:31 -0000      1.128
@@ -174,8 +174,8 @@
        assert rpin.lstat() == rpout.lstat() or rpin.isspecial()
        if Globals.change_ownership:
                rpout.chown(*rpout.conn.user_group.map_rpath(rpin))
-       if rpin.issym(): return # symlinks don't have times or perms
        if Globals.eas_write: rpout.write_ea(rpin.get_ea())
+       if rpin.issym(): return # symlinks don't have times or perms
        if (Globals.resource_forks_write and rpin.isreg() and
                rpin.has_resource_fork()):
                rpout.write_resource_fork(rpin.get_resource_fork())




reply via email to

[Prev in Thread] Current Thread [Next in Thread]