[Bug 14916] New: --times act like a skip switch if --compare-dest is used

samba-bugs at samba.org samba-bugs at samba.org
Mon Nov 22 11:59:43 UTC 2021


https://bugzilla.samba.org/show_bug.cgi?id=14916

            Bug ID: 14916
           Summary: --times act like a skip switch if --compare-dest is
                    used
           Product: rsync
           Version: 3.1.3
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayne at opencoder.net
          Reporter: marc at gutt.it
        QA Contact: rsync-qa at samba.org
  Target Milestone: ---

I created the following dirs and files:
###################################################################
mkdir /tmp/src
mkdir /tmp/dst
mkdir /tmp/comp
touch /tmp/src/test
touch /tmp/comp/test
###################################################################


Now, "test" has the same checksum, but different modification time. I use
"--checksum" to ignore modification times and it works as expected:
###################################################################
rsync --recursive --links --perms --times --group --owner --devices --specials
--verbose --checksum --dry-run /tmp/src/ /tmp/comp
sending incremental file list
./

sent 79 bytes  received 22 bytes  202.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
###################################################################


But it does not if I use "--compare-dest":
###################################################################
rsync --recursive --links --perms --times --group --owner --devices --specials
--verbose --checksum --dry-run --compare-dest=/tmp/comp /tmp/src/ /tmp/dst
sending incremental file list
./
test

sent 83 bytes  received 22 bytes  210.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
###################################################################


This works only, if I disable copying the modification times by removing
"--times":
###################################################################
rsync --recursive --links --perms --group --owner --devices --specials
--verbose --checksum --dry-run --compare-dest=/tmp/comp /tmp/src/ /tmp/dst
sending incremental file list

sent 73 bytes  received 12 bytes  170.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
###################################################################


This means "--times" acts like a skip switch if "--compare-dest" is used, which
I think is wrong.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the rsync mailing list