DO NOT REPLY [Bug 4764] New: Wrong include/exclude descriptions

samba-bugs at samba.org samba-bugs at samba.org
Wed Jul 4 18:41:49 GMT 2007


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

           Summary: Wrong include/exclude descriptions
           Product: rsync
           Version: 2.6.8
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: tps at vr-web.de
         QAContact: rsync-qa at samba.org


The manpage states:
 "- foo/" would exclude any directory named foo

But:
+ */
- i386/
This should include all directories, then exclude any i386-directory. Having a
look at what rsync does:
i386/debug/xorg-x11-drv-i810-debuginfo-1.6.5-10.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-mga-debuginfo-1.4.5-2.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-mouse-debuginfo-1.2.1-1.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-s3-debuginfo-0.5.0-1.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-savage-debuginfo-2.1.2-3.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-tdfx-debuginfo-1.3.0-2.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-trident-debuginfo-1.2.3-1.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-server-debuginfo-1.1.1-47.10.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-server-debuginfo-1.1.1-47.8.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-server-debuginfo-1.1.1-47.9.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-xinit-debuginfo-1.0.2-15.fc6.i386.rpm is uptodate

i386-Directories are included.


+ */
- */
This should include all directories, then exclude them all. rsync:
x86_64/debug/repodata/filelists.xml.gz
x86_64/debug/repodata/other.xml.gz
x86_64/debug/repodata/primary.xml.gz
x86_64/debug/repodata/repomd.xml
x86_64/repodata/filelists.xml.gz
x86_64/repodata/other.xml.gz
x86_64/repodata/primary.xml.gz
x86_64/repodata/repomd.xml
x86_64/repodata/updateinfo.xml.gz

All directories are included and finaly transfered.


+ */
- *
This should include all directories, then exclude all files or directories.
rsync:

This works as expected.


+ i386
- *
This should include all i386 directories, then exclude all files. rsync:

No files transfered.


+ i386/
- *
This should include all i386-directories, then exclude all files. rsync:

No files transfered, directory created.


+ i386**
- *
This should include all i386-directories and files, excluding all others.
rsync:
i386/debug/repodata/other.xml.gz is uptodate
i386/debug/repodata/primary.xml.gz is uptodate
i386/debug/repodata/repomd.xml is uptodate
i386/repodata/filelists.xml.gz is uptodate
i386/repodata/other.xml.gz is uptodate
i386/repodata/primary.xml.gz is uptodate

This is OK, but only if the i386-directory is at transfer root. Any other
i386-directory will not be transfered at all!


+ i386/
+ i386/*
- *
This should include the i386-directory and files. rsync:
i386/xsane-0.994-2.fc6.i386.rpm is uptodate
i386/xsane-gimp-0.994-2.fc6.i386.rpm is uptodate
i386/xterm-225-1.fc6.i386.rpm is uptodate
i386/yelp-2.16.0-13.fc6.i386.rpm is uptodate
i386/ypbind-1.19-7.fc6.i386.rpm is uptodate
i386/yum-3.0.6-1.fc6.noarch.rpm is uptodate
i386/yum-metadata-parser-1.0.3-1.fc6.i386.rpm is uptodate

This is OK.


Taking the description and a file hirarchy as given below (found on
rsync://mirrors.kernel.org/:
fedora
fedora/core
fedora/core/updates
fedora/core/updates/6
fedora/core/updates/6/ppc
fedora/core/updates/6/ppc/debug
fedora/core/updates/6/ppc/debug/repodata
fedora/core/updates/6/ppc/repodata
fedora/core/updates/6/x86_64
fedora/core/updates/6/x86_64/debug
fedora/core/updates/6/x86_64/debug/repodata
fedora/core/updates/6/x86_64/repodata
fedora/core/updates/6/i386
fedora/core/updates/6/i386/debug
fedora/core/updates/6/i386/debug/repodata
fedora/core/updates/6/i386/repodata
fedora/core/updates/6/SRPMS
fedora/core/updates/6/SRPMS/repodata
fedora/core/6
fedora/core/6/ppc
fedora/core/6/ppc/iso
fedora/core/6/ppc/debug
fedora/core/6/ppc/debug/repodata
fedora/core/6/ppc/os
fedora/core/6/ppc/os/ppc
fedora/core/6/ppc/os/ppc/iSeries
fedora/core/6/ppc/os/ppc/chrp
fedora/core/6/ppc/os/ppc/mac
fedora/core/6/ppc/os/ppc/ppc32
fedora/core/6/ppc/os/ppc/ppc64
fedora/core/6/ppc/os/Fedora
fedora/core/6/ppc/os/Fedora/base
fedora/core/6/ppc/os/Fedora/RPMS
fedora/core/6/ppc/os/stylesheet-images
fedora/core/6/ppc/os/images
fedora/core/6/ppc/os/images/iSeries
fedora/core/6/ppc/os/images/netboot
fedora/core/6/ppc/os/etc
fedora/core/6/ppc/os/repodata
fedora/core/6/x86_64
fedora/core/6/x86_64/iso
fedora/core/6/x86_64/debug
fedora/core/6/x86_64/debug/repodata
fedora/core/6/x86_64/os
fedora/core/6/x86_64/os/Fedora
fedora/core/6/x86_64/os/Fedora/base
fedora/core/6/x86_64/os/Fedora/RPMS
fedora/core/6/x86_64/os/stylesheet-images
fedora/core/6/x86_64/os/isolinux
fedora/core/6/x86_64/os/images
fedora/core/6/x86_64/os/images/xen
fedora/core/6/x86_64/os/images/pxeboot
fedora/core/6/x86_64/os/repodata
fedora/core/6/source
fedora/core/6/source/iso
fedora/core/6/source/SRPMS
fedora/core/6/source/SRPMS/repodata
fedora/core/6/i386
fedora/core/6/i386/iso
fedora/core/6/i386/debug
fedora/core/6/i386/debug/repodata
fedora/core/6/i386/os
fedora/core/6/i386/os/Fedora
fedora/core/6/i386/os/Fedora/base
fedora/core/6/i386/os/Fedora/RPMS
fedora/core/6/i386/os/stylesheet-images
fedora/core/6/i386/os/isolinux
fedora/core/6/i386/os/images
fedora/core/6/i386/os/images/xen
fedora/core/6/i386/os/images/pxeboot
fedora/core/6/i386/os/repodata

The exclude file:
+ */
- ppc/
- ppc64/
- x86_64/
- source/

should reveal at least in creating the directories and transfering only files
within these:
fedora/core/6/i386
fedora/core/6/i386/iso
fedora/core/6/i386/debug
fedora/core/6/i386/debug/repodata
fedora/core/6/i386/os
fedora/core/6/i386/os/Fedora
fedora/core/6/i386/os/Fedora/base
fedora/core/6/i386/os/Fedora/RPMS
fedora/core/6/i386/os/stylesheet-images
fedora/core/6/i386/os/isolinux
fedora/core/6/i386/os/images
fedora/core/6/i386/os/images/xen
fedora/core/6/i386/os/images/pxeboot
fedora/core/6/i386/os/repodata

This does not happen. All directories and all files are transfered, regardless
of being excluded or not.

Trying:
+ i386
- *

doesnt transfer anything, but should transfer all directories named i386.

Trying:
+ i386**
- *

only transfers directories named i386 within the transfer root.#

Trying:
+ i386/**
- *

transfers nothing, but should include any directory named i386 and all
subdirectories within transfer-root.

Trying:
+ **/i386
- *

Only creates the directory i386 if this is at transfer-root, but should have
had created any directory named i386, since '**/' is stated to match any
directory, regardless of deep.

Trying:
+ **/i386
+ **/i386/*
- *

Only transfers i386-directory and included files, directories named i386 deep
inside the hierarcy are not recognized.


In short: the matching algorithm described in the rsync documentation is not
the one implemented! It is badly broken and nearly unusable, since you will
have to experiment what might be matched and what not.


All tests done using:
rsync -avvP -n --exclude-from=exclude.lst rsync://mirrors.kernel.org/fedora/
/tmp/test/


-- 
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