RFC for feature request

Dave Dykstra dwd at bell-labs.com
Mon May 13 10:50:01 EST 2002


On Sun, May 12, 2002 at 05:00:17PM -0500, Dave Barnett wrote:
> Hi.
> 
> Recently at work we've begun using rsync to sync up our development baseline 
> area between our office in Houston, and the one in Gatwick.
> 
> We use rsync quite extensively, and are quite happy with it, but have run 
> into a bug discussed by Dave Dykstra in the "Discussion/2214" entry on the 
> rsync website:
> http://lists.samba.org/pipermail/rsync/1999-October/001440.html
> 
> Basically, due to the way fnmatch does it's matching for excludes, something 
> we thought we had excluded got clobbered when we didn't want it to be 
> touched.   The issue is that fnmatch expects to match from the beginning, but 
> we were trying to match deeper in the directory structure.
>
> Once we found Dave's comments, we were able to get around the issue, but it 
> got me to thinking.  His parting words were:
> Someday include/exclude's semantics and implementation should be completely
> redone.
> 
> I'm very familiar with Perl, and Perl regular expressions, as I use both 
> constantly.  At http://www.pcre.org you will find the Perl Compatible Regular 
> Expression library.
> 
> What I'd like to propose [and am willing to work on in my "free" time], is to 
> implement:
> a) a new command-line option [or two] that allow for the fnmatch behavior 
> [default] or the use of the PCRE library's RE engine.
> b) the functions to implement the file matching bits needed by include / 
> exclude using the pcre library functions.
> 
> However, before I delve into doing this, I'd like some comments:
> 1) Has the above bug already been worked out?

It has come up again recently and Wayne Davison is working on a fix for it.


> 2) Is anyone working on such a re-write / addition?  Doesn't have to be using 
> "pcre", but I'd hate to "waste" time implementing it if someone else is 
> already working along the same lines.

Nobody is working on such an addition, and I think it would be very
helpful.  I think it should probably match only on entire path names and
not applied recursively like the confusing current algorithm.


> 3) How are things like this normally handled?

You mean feature additions to rsync?  Write a patch and submit it to the
mailing list.


> The reason I would prefer to do this as an additional option is that it will 
> allow existing scripts to continue unchanged, while allowing those who want 
> to use the pcre features can do so.
> 
> Thoughts?
> Comments?
> Concerns?

I think that makes a lot of sense.

- Dave Dykstra




More information about the rsync mailing list