Exclude not working

Giuliano Gavazzi dev+lists at humph.com
Tue Jul 10 13:11:05 GMT 2007


On 10 Jul 2007, at 00:18, Matt McCutchen wrote:

> On 7/9/07, Giuliano Gavazzi <dev+lists at humph.com> wrote:
>>
>> you did not append "/" to your exclude patterns and you did not show
>> us the value of the SOURCE macro. Either might explain the failure.
>
> All a trailing "/" would do is prevent the pattern from matching a
> non-directory, so its absence can't be the problem.  More likely is
> the $SOURCE.

indeed I wasn't sure about the first part of my assertion. However  
rsync is quite inconsistent in its treatment of directories. In this  
case:

        The patterns can take several forms. The rules are:

        o      if the pattern starts with a / then it is  matched   
against  the
               start  of  the filename, otherwise it is matched  
against the end
               of the filename.  This is the equivalent of a leading  
^ in regu-
               lar expressions.  Thus "/foo" would match a file  
called "foo" at
               the transfer-root (see above for how this is different  
from  the
		[...]

while I can accept that filename is here intended as path, and so  
includes directories as well. In the last sentence the term "file" is  
used, that for consistency should not include directories. I say  
consistency, as without recursive option directories are not copied  
(so they are not files), and with the link destination someone noted  
that empty directories are not linked. Both behaviours are  
conceptually flawed, as a directory, even an empty one, carries  
information in its name.

Giuliano




More information about the rsync mailing list