Your message dated Sun, 10 Apr 2005 15:03:28 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bug#232391: Proposed fix for rsync to (correctly) ignore 
errors on excluded files
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 12 Feb 2004 13:10:33 +0000
>From [EMAIL PROTECTED] Thu Feb 12 05:10:33 2004
Return-path: <[EMAIL PROTECTED]>
Received: from bellevue.puremagic.com [209.189.198.108] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1ArGbx-00047s-00; Thu, 12 Feb 2004 05:10:33 -0800
Received: from kinison.puremagic.com (cs679214-52.austin.rr.com [67.9.214.52])
        by bellevue.puremagic.com (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with 
ESMTP id i1CDAT0X007020
        (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
        for <[EMAIL PROTECTED]>; Thu, 12 Feb 2004 05:10:30 -0800
Date: Thu, 12 Feb 2004 07:10:28 -0600 (CST)
From: Evan Harris <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Proposed fix for rsync to (correctly) ignore errors on excluded
 files
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by amavisd-new
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_02_10 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=HAS_PACKAGE autolearn=no 
        version=2.60-bugs.debian.org_2004_02_10
X-Spam-Level: 


Package: rsync
Version: 2.6.0

This is an update to a previously submitted bug for version 2.5.5, that the
bug is still not fixed in 2.6.0.

In rsync package, file flist.c, function make_file, there is a block that
calls readlink_stat and if that fails with a ENOENT it checks if the file is
excluded to see if it should ignore the error.

I think this is too restrictive.  There is at least one more type of error
(ETXTBSY) that I commonly encounter that causes problems.  In any case, no
matter what error is returned, if the file is excluded, any error should
probably be ignored.  (But to be on the safe side, my patch below only adds
the ETXTBSY error to one that can be ignored).

This problem is demonstrated by rsyncing files from a remotely (smb) mounted
machine, where there are files on the remote machine which are always
locked.  I excluded them, but since in my case the error returned is
ETXTBSY, the special case code to ignore if excluded doesn't get used. This
causes the --delete flag to be ignored since rsync thinks there was an IO
error, even though we don't care.

In rsync package, file flist.c, function make_file, context diff of fix:

*** rsync-2.6.0/flist.c Thu Feb 12 06:42:04 2004
--- rsync-2.6.0-patched/flist.c Thu Feb 12 06:50:43 2004
***************
*** 686,692 ****

        if (readlink_stat(fname, &st, linkbuf) != 0) {
                int save_errno = errno;
!               if (errno == ENOENT && exclude_level != NO_EXCLUDES) {
                        /* either symlink pointing nowhere or file that
                         * was removed during rsync run; see if excluded
                         * before reporting an error */
--- 686,692 ----

        if (readlink_stat(fname, &st, linkbuf) != 0) {
                int save_errno = errno;
!               if ((errno == ENOENT || errno == ETXTBSY) && exclude_level != 
NO_EXCLUDES) {
                        /* either symlink pointing nowhere or file that
                         * was removed during rsync run; see if excluded
                         * before reporting an error */


Evan


---------------------------------------
Received: (at 232391-done) by bugs.debian.org; 10 Apr 2005 13:04:44 +0000
>From [EMAIL PROTECTED] Sun Apr 10 06:04:44 2005
Return-path: <[EMAIL PROTECTED]>
Received: from cust.88.114.adsl.cistron.nl (gw.wurtel.net) [195.64.88.114] 
(mail)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DKc7H-0000Zz-00; Sun, 10 Apr 2005 06:04:43 -0700
Received: from wurtel ([192.168.1.1] helo=wurtel.net)
        by gw.wurtel.net with esmtp (Exim 3.36 #1 (Debian))
        id 1DKc65-0002k6-00; Sun, 10 Apr 2005 15:03:29 +0200
Received: from paul by wurtel.net with local (Exim 4.33 #1 (Debian))
        id 1DKc64-0006pu-TB; Sun, 10 Apr 2005 15:03:28 +0200
Date: Sun, 10 Apr 2005 15:03:28 +0200
From: Paul Slootman <[EMAIL PROTECTED]>
To: Evan Harris <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: Bug#232391: Proposed fix for rsync to (correctly) ignore errors on 
excluded files
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.5.6i
X-Scanner: exiscan *1DKc65-0002k6-00*m3alST56f8U*Wurtel
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

On Thu 12 Feb 2004, Evan Harris wrote:
> 
> In rsync package, file flist.c, function make_file, there is a block that
> calls readlink_stat and if that fails with a ENOENT it checks if the file is
> excluded to see if it should ignore the error.

The logic has cheanged a bit in the current version.
The code now does:

        if (readlink_stat(thisname, &st, linkname) != 0) {
                int save_errno = errno;
                /* See if file is excluded before reporting an error. */
                if (filter_level != NO_FILTERS
                    && is_excluded(thisname, 0, filter_level))
                        return NULL;

Hence if the file is excluded, any errors will be ignored.
That should fix the reported problem, hence I'm now closing this bug report.


Paul Slootman


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to