Bug 5050 - rsync tries to --copy-dest in --dry-run mode
Summary: rsync tries to --copy-dest in --dry-run mode
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.0
Hardware: x86 Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2007-10-27 23:13 UTC by Matt McCutchen
Modified: 2008-07-26 10:17 UTC (History)
0 users

See Also:

Fix: skip the call to copy_file in dry-run mode (456 bytes, patch)
2007-10-27 23:40 UTC, Matt McCutchen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt McCutchen 2007-10-27 23:13:21 UTC
With --copy-dest, rsync tries to copy basis files with unchanged data into the destination even in --dry-run mode; fortunately, the attempt is blocked by do_open.  Rsync should itemize the local copy without trying to actually perform it.

To reproduce this bug:

mkdir src dest basis
echo foo >src/file
echo foo >basis/file
rsync -r -ni --checksum --copy-dest=../basis/ src/ dest/


rsync: open "/path/to/dest/file": Success (0)
>f+++++++++ file
rsync error: some files could not be transferred (code 23) at main.c(1053) [sender=3.0.0pre4]
Comment 1 Matt McCutchen 2007-10-27 23:40:46 UTC
Created attachment 2955 [details]
Fix: skip the call to copy_file in dry-run mode
Comment 2 Wayne Davison 2007-10-28 16:27:56 UTC
Your fix is now in CVS.  Thanks!