Bug 9416 - --files-from : RERR_PARTIAL vs RERR_VANISHED
--files-from : RERR_PARTIAL vs RERR_VANISHED
Status: RESOLVED WONTFIX
Product: rsync
Classification: Unclassified
Component: core
3.1.0
All All
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-21 10:54 UTC by Henk Penning
Modified: 2013-06-02 23:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henk Penning 2012-11-21 10:54:37 UTC
When using "--files-from list" where the list contains the name of a file that 
doest't exist on the server, rsync exits with RERR_PARTIAL.

If the only error (on the server side) is "can't lstat file", an exit with
the more specific RERR_VANISHED would be more to the point.

Context: "instant mirroring of CPAN" ; CPAN publishes (every minute) a list
of changes (files to delete or update). I use "rsync --files-from" to fetch
the updated files. In a corner-case I need to determine if a given file
actually exists on the server (if not, discard the update).

At the moment, this is hard. But if a single-file rsync would return
RERR_VANISHED if the file doesn't exist, I could use that.

So, I suggest "rsync --files-from" exits with RERR_VANISHED if the only
error is that one or more files in the list can't be lstat'ed.

Thanks, regards -- Henk Penning
Comment 1 Wayne Davison 2013-06-02 23:25:59 UTC
In looking at this, I like the RERR_PARTIAL return better for missing args (which is what files-from files are).  However, you can use one of these to get rsync to treat missing args as OK:

    --ignore-missing-args
    --delete-missing-args