Re[2]: rsync and broken symlinks

2004-12-16 Thread Yakov Hrebtov
WD Your example works fine for me, so run rsync --version and ensure that My results: # rsync --version rsync version 2.6.3 protocol version 28 Copyright (C) 1996-2004 by Andrew Tridgell and others http://rsync.samba.org/ Capabilities: 64-bit files, socketpairs, hard links, symlinks,

Re: rsync and broken symlinks

2004-12-16 Thread Wayne Davison
On Thu, Dec 16, 2004 at 01:38:42PM +0500, Yakov Hrebtov wrote: where is the message -- skipping non-regular file broken-link? I can only imagine that this is some kind of OS misfeature. Try running rsync under something like strace -f (or your OS's equivalent) and see what is going wrong with

Re[2]: rsync and broken symlinks

2004-12-16 Thread Yakov Hrebtov
Hello, Wayne. WD I can only imagine that this is some kind of OS misfeature. Try running WD rsync under something like strace -f (or your OS's equivalent) and see WD what is going wrong with the system calls. If you see readlink() return WD -1 for the file, that would cause rsync to skip it as

Re: rsync and broken symlinks

2004-12-16 Thread Dmitry V. Levin
Hi, On Thu, Dec 16, 2004 at 01:07:35AM -0800, Wayne Davison wrote: On Thu, Dec 16, 2004 at 01:38:42PM +0500, Yakov Hrebtov wrote: where is the message -- skipping non-regular file broken-link? I can only imagine that this is some kind of OS misfeature. Try running rsync under something

Re: rsync and broken symlinks

2004-12-16 Thread Dmitry V. Levin
Hi, On Thu, Dec 16, 2004 at 09:02:24AM -0800, Wayne Davison wrote: On Thu, Dec 16, 2004 at 02:34:02PM +0500, Yakov Hrebtov wrote: You see, readlink call is successful. But rsync then trying to access the referent of symlink... But referent doesnt exist. The only time that rsync calls

Re: rsync and broken symlinks

2004-12-16 Thread Wayne Davison
On Thu, Dec 16, 2004 at 02:34:02PM +0500, Yakov Hrebtov wrote: You see, readlink call is successful. But rsync then trying to access the referent of symlink... But referent doesnt exist. The only time that rsync calls access() on the files it is sending is when the ignore nonreadable parameter

Re: rsync and broken symlinks

2004-12-16 Thread Wayne Davison
On Thu, Dec 16, 2004 at 10:27:20PM +0100, Paul Slootman wrote: Just to be certain - readlink() is only called if --copy-links is NOT specified? In that case, I agree. Correct. If --copy-links was specified, then rsync will either do a normal file copy of the referent of the symlink (and rsync

Re: rsync and broken symlinks

2004-12-16 Thread Dmitry V. Levin
Hi, On Thu, Dec 16, 2004 at 10:27:20PM +0100, Paul Slootman wrote: On Thu 16 Dec 2004, Wayne Davison wrote: As for the fix, one could argue that ignore nonreadable has a bug in it when dealing with symlinks -- if readlink() worked, the symlink was readable, so there is no need to call

Re: rsync and broken symlinks

2004-12-16 Thread Wayne Davison
On Thu, Dec 16, 2004 at 10:36:05AM +0500, Yakov Hrebtov wrote: How to copy broken symlink as symlink with rsync? Your example works fine for me, so run rsync --version and ensure that it even has symlink support compiled into it. E.g.: rsync version 2.6.3 protocol version 28 Copyright (C)

Re: rsync and broken symlinks

2004-12-16 Thread Wayne Davison
On Thu, Dec 16, 2004 at 08:20:00PM +0300, Dmitry V. Levin wrote: I see, it happens due to the patched loadparam.c; I'll change that back. OK -- I'm glad the cause is resolved. As for the fix, one could argue that ignore nonreadable has a bug in it when dealing with symlinks -- if readlink()

Re: rsync and broken symlinks

2004-12-16 Thread Paul Slootman
On Thu 16 Dec 2004, Wayne Davison wrote: As for the fix, one could argue that ignore nonreadable has a bug in it when dealing with symlinks -- if readlink() worked, the symlink was readable, so there is no need to call access() on it. The appended patch changes this so that rsync doesn't

CVS update: rsync

2004-12-16 Thread Wayne Davison
Date: Thu Dec 16 22:47:36 2004 Author: wayned Update of /data/cvs/rsync In directory dp.samba.org:/tmp/cvs-serv21271 Modified Files: flist.c Log Message: The ignore nonreadable daemon parameter no longer affects symlinks that are being copied, even if they point nowhere. Revisions: