Bug 10356 - Include rsync-no-vanished support script
Summary: Include rsync-no-vanished support script
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.1
Hardware: All All
: P5 minor (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2014-01-01 15:00 UTC by Jakob Unterwurzacher
Modified: 2014-06-26 15:22 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Unterwurzacher 2014-01-01 15:00:19 UTC
Bug 3653 discussed how "file has vanished" warnings can be silenced. Code changes did not make it in, but Matt McCutchen wrote the rsync-no-vanished bash wrapper script, whose final version seems to handle it correctly, using advanced bash features:

ignoreout='^(file has vanished: |rsync warning: some files vanished before they could be transferred)'
set -o pipefail
rsync "$@" 2>&1 | (egrep -v "$ignoreout" || true)
if [ $a == $ignoreexit ]; then
	exit 0
	exit $a

What is missing is to make that script accessible to users. I suggest to include it in the support directory in the rsync tarball.
Comment 1 Wayne Davison 2014-01-01 18:37:39 UTC
Good idea -- thanks.
Comment 2 Dmitry Yu Okunev 2014-06-26 04:39:41 UTC
IMHO, this's wrong by design solution. There should be an option in rsync itself, but not a hacky wrapper.

BTW. couldn't there be a situation, that rsync got two errors (one of which is "24") and exited with the exitcode "24", that will be suppressed by the script. So the other error will be unnoticed?
Comment 3 Wayne Davison 2014-06-26 15:22:47 UTC
Rsync doesn't exit with error code 24 if a more important error happens (which is basically any other error).