Assorted oddities with --relative

Matt McCutchen matt at mattmccutchen.net
Tue Oct 30 23:45:15 GMT 2007


I have discovered a few oddities with --relative in the latest
development rsync (from git, yay!):

#1. Junk in the middle of a source argument leads to duplicate entries
in the file list:

$ mkdir src src/D
$ rsync-dev -ni -rR ././src/.//.//.//.//.//.//.//./D/ dest/
cd+++++++++ src/
cd+++++++++ src/./
cd+++++++++ src/
cd+++++++++ src/./
cd+++++++++ src/
cd+++++++++ src/./
cd+++++++++ src/
cd+++++++++ src/./
cd+++++++++ src/
cd+++++++++ src/./
cd+++++++++ src/
cd+++++++++ src/./
cd+++++++++ src/
cd+++++++++ src/./
cd+++++++++ src/
cd+++++++++ src/./
cd+++++++++ src/D/

Without incremental recursion, the problem is less severe:

$ rsync-dev -ni -rR --no-i-r ././src/.//.//.//.//.//.//.//./D/ dest/
cd+++++++++ src/./
cd+++++++++ src/
cd+++++++++ src/D/

Rsync 2.6.9 gets this right:

$ rsync-2.6.9 -ni -rR ././src/.//.//.//.//.//.//.//./D/ dest/
cd+++++++ src/
cd+++++++ src/D/

#2. Rsync seems to have trouble accessing a source argument that begins
with ./.// :

$ ls -ld ././/src/
drwx------+ 3 matt matt 72 2007-10-30 19:32 ././/src/
$ rsync-dev -ni -rR ././/src/ dest/
rsync: link_stat "/src" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at
main.c(1053) [sender=3.0.0pre4]

Rsync 2.6.9 also fails, but differently:

$ rsync-2.6.9 -ni -rR ././/src/ dest/
rsync: opendir "/src" failed: No such file or directory (2)
cd+++++++ /src/
rsync error: some files could not be transferred (code 23) at
main.c(977) [sender=2.6.9]

#3. With incremental recursion, excluding an ancestor of a source
argument stops traversal of a source argument:

$ rsync-dev -ni -rR --exclude='/src' src/D/ dest/
(No output)

This happens even with --no-implied-dirs (!):

$ rsync-dev -ni -rR --no-implied-dirs --exclude='/src' src/D/ dest/
(No output)

When incremental recursion is turned off, rsync works correctly:

$ rsync-dev -ni -rR --no-i-r --exclude='/src' src/D/ dest/
cd+++++++++ src/D/

Matt



More information about the rsync mailing list