DO NOT REPLY [Bug 4764] Wrong include/exclude descriptions
samba-bugs at samba.org
samba-bugs at samba.org
Thu Jul 5 22:39:37 GMT 2007
https://bugzilla.samba.org/show_bug.cgi?id=4764
------- Comment #4 from hashproduct+rsync at gmail.com 2007-07-05 17:39 CST -------
(In reply to comment #3)
> if this where true, an --exclude-from file
>
> + 6/
> - *
>
> should only match directories named '6'. For example
>
> core/6
> update/6
>
> and so on. Could you please explain me, why I am seeing with this rule above
>
> $ rsync -av --exclude-from=exclude.txt rsync://mirrors.kernel.org/fedora/
> [...]
> receiving file list ... done
> drwxr-xr-x 77 2007/05/21 23:37:48 .
>
> sent 101 bytes received 787 bytes 118.40 bytes/sec
> total size is 0 speedup is 0.00
>
> The driectories '6' are not matched at all --- and there are some of them
> within this hierarchy! At least these I expect to be listed!
In all of your examples, rsync's behavior is correct. The "core" and "update"
directories are excluded by the "- *", so rsync never even goes inside to check
for "6" directories. The man page explains this:
``Note that, when using the --recursive (-r) option (which is implied by -a),
every subcomponent of every path is visited from the top down, so
include/exclude patterns get applied recursively to each subcomponent's full
name (e.g. to include "/foo/bar/baz" the subcomponents "/foo" and "/foo/bar"
must not be excluded). The exclude patterns actually short-circuit the
directory traversal stage when rsync finds the files to send. If a pattern
excludes a particular parent directory, it can render a deeper include pattern
ineffectual because rsync did not descend through that excluded section of the
hierarchy. This is particularly important when using a trailing '*' rule. For
instance, this won't work:
+ /some/path/this-file-will-not-be-found
+ /file-is-included
- *
This fails because the parent directory "some" is excluded by the '*' rule, so
rsync never visits any of the files in the "some" or "some/path" directories.''
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the rsync
mailing list