rsync 2.6.9 on OS X. files with xattrs don't retain mtime.

Wesley W. Terpstra wesley at terpstra.ca
Fri Nov 10 14:55:36 GMT 2006


On Nov 10, 2006, at 11:30 AM, Matt Jenns wrote:
> I'm really excited about the recent work on extended attributes. I've
> compiled 2.6.9 with xattr support, and run a few tests. It seems that
> if I have a file with an extended attribute ( a resource fork in this
> case), and I run rsync -aX , the mtime is not preserved.
>
> Is this the expected behaviour?

No. However, it works for me:
> ottawa:~/rsync/cvs terpstra$ ./rsync -ax peanut peanut2
> ottawa:~/rsync/cvs terpstra$ ./rsync -axX peanut peanut3
> ottawa:~/rsync/cvs terpstra$ stat peanut*
> 234881035 3247760 -rw-r--r-- 1 terpstra terpstra 0 0 "Nov 10  
> 15:33:02 2006" "Nov 10 15:33:02 2006" "Nov 10 15:33:12 2006" 4096 0  
> 0 peanut
> 234881035 3247791 -rw-r--r-- 1 terpstra terpstra 0 0 "Nov 10  
> 15:46:40 2006" "Nov 10 15:33:02 2006" "Nov 10 15:46:40 2006" 4096 0  
> 0 peanut2
> 234881035 3247792 -rw-r--r-- 1 terpstra terpstra 0 0 "Nov 10  
> 15:46:45 2006" "Nov 10 15:33:02 2006" "Nov 10 15:46:45 2006" 4096 0  
> 0 peanut3
> ottawa:~/rsync/cvs terpstra$ xattr --list peanut*
> peanut
>         foo     bar
> peanut2
> peanut3
>         foo     bar

What filesystem are you using? I've tried  HFS+ and UFS and both  
seemed to work.

Looking over the code, it does write extended attributes after  
setting the mtime, but I wouldn't have thought this would matter.  
Indeed, on my computer, it doesn't.


More information about the rsync mailing list