Bug 10238 - --dry-run does not change directory, causes --link-dest failure on symlinks
Summary: --dry-run does not change directory, causes --link-dest failure on symlinks
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2013-10-30 20:49 UTC by Peter Wu
Modified: 2013-11-25 17:19 UTC (History)
0 users

See Also:

testcase (697 bytes, application/octet-stream)
2013-10-30 20:49 UTC, Peter Wu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Wu 2013-10-30 20:49:53 UTC
Created attachment 9350 [details]

When running rsync --xattrs --link-dest with --dry-run, a warning is printed if the current directory does not match the source directory. Inspection with strace showed that the current directory is not changed when using --dry-run.

An example message:

    rsync: get_xattr_names: llistxattr(""/tmp/test-rsync-bug/2/a/file"",1024) failed: No such file or directory (2)

See attached shell script.
Comment 1 Wayne Davison 2013-11-25 17:19:55 UTC
Both symlinks and devices had a bug where the finding of a link-dest item to use caused the itemize info to break when --dry-run was in effect.  I changed the code to itemize against the found alt-dest file (as normal files already did), and that fixes this up (fix is in git).  Thanks for the handy test script!