rsync dir-merge filter rule leaking outside its directory

Manny knill at eskimo.com
Fri Nov 29 13:04:47 MST 2013


Before I submit a bug report, perhaps the following has been seen
and dealt with before:



I found that it is possible for dir-merge filter rules to
inconsistently leak outside the directory where they are defined. This
happens when using --delete-after and -R and when asking for transfer
of a child of the directory where the filter rules are defined, with
an other transfer directory later on the command line. See below.  I
am using version 3.0.9, but didn't find any indication that this has
been noted in the bug reports or the update to 3.1.0.  The following
reproduced the issue with version 3.0.9 (I don't have easy access to
version 3.1.0, I am doing this on a 'debian wheezy' system.)

<pre>
# Prepare test source directories:
mkdir tsts; mkdir tsts/a; mkdir tsts/a/b; touch tsts/a/b/z
mkdir tsts/s; touch tsts/s/z;
echo "- *" > tsts/a/_filter_

# Prepare test target directory:
mkdir tstt

# Dry-run rsyncs:
rsync -n -ivv -r --filter='dir-merge _filter_' --delete-after -R \
  tsts/./a/b tsts/./s tstt
  # This 'hides' directory s.

rsync -n -ivv -r --filter='dir-merge _filter_' --delete-after -R \
  tsts/./s  tsts/./a/b tstt
  # This does not 'hide' directory s.

rsync -n -ivv -r --filter='dir-merge _filter_' --delete-after -R \
  tsts/./a tsts/./s tstt
  # This also does not 'hide' directory s.

rsync -n -ivv -r --filter='dir-merge _filter_'  -R \
  tsts/./a/b tsts/./s tstt
  # This also does not 'hide' directory s.

rsync -n -ivv -r --filter='dir-merge _filter_'  --delete -R \
  tsts/./a/b tsts/./s tstt
  # Nor does this 'hide' directory s.

</pre>


Best wishes,

Manny


More information about the rsync mailing list