Bug 3844 - --delete with --dry-run no longer reports files to be deleted
Summary: --delete with --dry-run no longer reports files to be deleted
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.8
Hardware: x86 Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2006-06-16 11:22 UTC by Dave Wolfe
Modified: 2006-07-01 11:37 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Dave Wolfe 2006-06-16 11:22:23 UTC
Prior to 2.6.8 I was able to see which files would be deleted using:

rsync -t --delete -R -z -C -l --safe-links --exclude [...] -n -r -v .

(multiple --exclude options and files removed for brevity)
Now when -n is removed, files are deleted that weren't reported when -n was specified.
Comment 1 Matt McCutchen 2006-06-17 09:18:49 UTC
I could not reproduce this behavior from the information you gave.  Could you please find the simplest case of source and destination directories in which rsync exhibits the bad behavior and then post tar files of the source and destination directories in their original state?
Comment 2 Paul Johnson 2006-06-20 22:49:08 UTC
I have observed this same problem in the rsync that was recently installed in fedora core 5 updates (rsync-2.6.8-1.FC5.1).  The -v switch corrects the problem.  I can post the tar file if you want, but I don't think you should need it. I give you the recipe instead.  Observe. I just copied the first tmp file I could find into test2 and without -v, it is not mentioned.

[pauljohn@pols125 ~]$ cd /tmp/
[pauljohn@pols125 tmp]$ mkdir test1
[pauljohn@pols125 tmp]$ mkdir test2
[pauljohn@pols125 tmp]$ cp VitaePosted.lyx test1/
[pauljohn@pols125 tmp]$ rsync -ran test1 test2
[pauljohn@pols125 tmp]$ rsync -ravn test1 test2
building file list ... done

sent 121 bytes  received 32 bytes  306.00 bytes/sec
total size is 6047  speedup is 39.52
Comment 3 Matt McCutchen 2006-06-21 08:03:42 UTC
Paul, all you are seeing is that, as of rsync 2.6.7, -n no longer implies -v (see OLDNEWS) and you have to provide -v yourself if you want information on what would be changed.

A mismatch between what rsync says it will do with -n -v and what it actually does is more worrisome.  If anyone can find a reproducible test case for Dave's problem, please post it.
Comment 4 Dave Wolfe 2006-07-01 11:37:09 UTC
Same situation with this month's outdated files and it displayed the files to be deleted, so I can't explain what I saw when I filed this bug since nothing else changed since then that I'm aware of. However, I don't control the client rsync version.