Rsync itemizing "p" even when -p, -E are off
Matt McCutchen
matt at mattmccutchen.net
Sat Mar 8 16:53:50 GMT 2008
On Mon, 2008-02-18 at 10:26 -0800, Wayne Davison wrote:
> I recall thinking that the condition was superfluous for most cases (due
> to how we cache the local permissions when preserving is off), and that
> I wanted to see when 'p' would pop in the output (indicating that a
> permission change had unexpectedly happened). Since you've shown that
> this can be confusing in the link-dest case, I'll change it back.
It turns out that just restoring the condition isn't enough, as rsync
still incorrectly itemizes 'p' when -E is on and an alternate basis file
differs from the destination file-to-be in permissions but not in
executability:
$ rm -r *
$ mkdir src dest basis
$ touch src/file
$ rsync-dev -a src/ basis/
$ chmod 600 src/file
$ chmod 644 basis/file
$ rsync-dev -nii -rE src/ basis/
.d ./
.f file
$ rsync-dev -nii -rE --link-dest=../basis/ src/ dest/
.d ./
hf...p..... file
"itemize" needs to use the exact same test as "unchanged_attrs". This
would be a great opportunity to factor out a lot of the
attribute-comparing code that is duplicated in "itemize" and
"unchanged_attrs" in order to reduce the risk of discrepancies between
them in the future and make it simpler to add support for a new
attribute to rsync.
Matt
More information about the rsync
mailing list