Package: rsync Version: 3.1.0-2 Severity: normal Dear Maintainer,
rsync fails to remove source files with --remove-source when those are symlinks whose referents are transferred with the --copy-links (-L) option. rsync returns the error: ERROR: Skipping sender remove for changed file: […] Steps to reproduce: 1. Create a set of files, some of which are symlinks with valid referents. marc@defiant:~$ cd $(mktemp -d) marc@defiant:/tmp/tmp.L4VQqyIk11$ mkdir -p orig/src dst marc@defiant:/tmp/tmp.L4VQqyIk11$ date > orig/src/A marc@defiant:/tmp/tmp.L4VQqyIk11$ date > orig/B marc@defiant:/tmp/tmp.L4VQqyIk11$ ln -s /tmp/tmp.L4VQqyIk11/orig/B orig/src/ marc@defiant:/tmp/tmp.L4VQqyIk11$ ls -l orig/src/ total 4 -rw-rw-r-- 1 marc marc 29 Dec 15 21:17 A lrwxrwxrwx 1 marc marc 26 Dec 15 21:17 B -> /tmp/tmp.L4VQqyIk11/orig/B marc@defiant:/tmp/tmp.L4VQqyIk11$ ls -lL orig/src/ total 8 -rw-rw-r-- 1 marc marc 29 Dec 15 21:17 A -rw-rw-r-- 1 marc marc 29 Dec 15 21:17 B 2. Copy those files with rsync, using the option --remove-source to remove the successfully transferred source files and --copy-links (-L) to copy the symlink referent instead of the symlink. marc@defiant:/tmp/tmp.L4VQqyIk11$ rsync -aL --remove-source-files orig/src/ dst/ ERROR: Skipping sender remove for changed file: B Actual result: rsync throws an error and does not remove the source if it is a symlink. Expected result: rsync should delete the symlink. The mtime of the destination file matches the mtime of the source file (the symlink referent). It does not match the mtime of the symlink. I think the rsync error message hints at the symlink mtime. Symlink mtimes are irrelevant and should probably not be used here. marc@defiant:/tmp/tmp.L4VQqyIk11$ stat orig/src/B File: ‘orig/src/B’ -> ‘/tmp/tmp.L4VQqyIk11/orig/B’ Size: 26 Blocks: 0 IO Block: 4096 symbolic link Device: fd00h/64768d Inode: 394555 Links: 1 Access: (0777/lrwxrwxrwx) Uid: ( 1000/ marc) Gid: ( 1000/ marc) Access: 2013-12-15 21:17:17.364125558 +0100 Modify: 2013-12-15 21:17:17.364125558 +0100 Change: 2013-12-15 21:17:17.364125558 +0100 Birth: - marc@defiant:/tmp/tmp.L4VQqyIk11$ stat -L orig/src/B File: ‘orig/src/B’ Size: 29 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 393240 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/ marc) Gid: ( 1000/ marc) Access: 2013-12-15 21:17:04.420631451 +0100 Modify: 2013-12-15 21:17:04.424631295 +0100 Change: 2013-12-15 21:17:04.424631295 +0100 Birth: - marc@defiant:/tmp/tmp.L4VQqyIk11$ stat dst/B File: ‘dst/B’ Size: 29 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 394557 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/ marc) Gid: ( 1000/ marc) Access: 2013-12-15 21:18:03.110337502 +0100 Modify: 2013-12-15 21:17:04.424631295 +0100 Change: 2013-12-15 21:18:03.110337502 +0100 Birth: - -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (745, 'testing'), (400, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.11-2-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages rsync depends on: ii base-files 7.2 ii libacl1 2.2.52-1 ii libc6 2.17-97 ii libpopt0 1.16-8 ii lsb-base 4.1+Debian12 ii zlib1g 1:1.2.8.dfsg-1 rsync recommends no packages. Versions of packages rsync suggests: ii openssh-client 1:6.4p1-1 ii openssh-server 1:6.4p1-1 -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org