Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:acdc:as_python3_module
rsync
rsync-fix-delay-updates-never-updates-after-int...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rsync-fix-delay-updates-never-updates-after-interruption.patch of Package rsync
From ce51c1b0ae4c0cc35fa14f69271776e3e3ae6354 Mon Sep 17 00:00:00 2001 From: Natanael Copa <ncopa@alpinelinux.org> Date: Wed, 21 Jul 2021 16:38:22 +0200 Subject: [PATCH 1/3] Add regression test for --delay-updates (#192) to test https://github.com/WayneD/rsync/issues/192 --- testsuite/delay-updates.test | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 testsuite/delay-updates.test diff --git a/testsuite/delay-updates.test b/testsuite/delay-updates.test new file mode 100644 index 000000000..54961dfa9 --- /dev/null +++ b/testsuite/delay-updates.test @@ -0,0 +1,21 @@ +#! /bin/sh + +# Test rsync --delay-updates + +. "$suitedir/rsync.fns" + +mkdir "$fromdir" + +echo 1 > "$fromdir/foo" + +checkit "$RSYNC -avvv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" + +mkdir "$todir/.~tmp~" +echo 2 > "$todir/.~tmp~/foo" +touch -r .. "$todir/.~tmp~/foo" "$todir/foo" +echo 3 > "$fromdir/foo" + +checkit "$RSYNC -avvv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" + +# The script would have aborted on error, so getting here means we've won. +exit 0 From 5a4ea7e468ae53c09b98803da3519727becb48ad Mon Sep 17 00:00:00 2001 From: Natanael Copa <ncopa@alpinelinux.org> Date: Thu, 22 Jul 2021 13:30:17 +0200 Subject: [PATCH 2/3] Fix regression with --delay-updates (#192) Fixes regression introduced with commit 3a7bf54ad520 (A resumed partial-dir file is transferred in-place.) Fixes https://github.com/WayneD/rsync/issues/192 --- receiver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver.c b/receiver.c index e85c4779c..b5020d074 100644 --- a/receiver.c +++ b/receiver.c @@ -881,7 +881,7 @@ int recv_files(int f_in, int f_out, char *local_name) do_unlink(partialptr); handle_partial_dir(partialptr, PDIR_DELETE); } - } else if (keep_partial && partialptr && !one_inplace) { + } else if (keep_partial && partialptr && (!one_inplace || delay_updates)) { if (!handle_partial_dir(partialptr, PDIR_CREATE)) { rprintf(FERROR, "Unable to create partial-dir for %s -- discarding %s.\n", From 15ec7de5503c57860fb73ea6e4a349f1e70b72db Mon Sep 17 00:00:00 2001 From: Wayne Davison <wayne@opencoder.net> Date: Wed, 28 Jul 2021 09:03:10 -0700 Subject: [PATCH 3/3] Tweak rsync options. --- testsuite/delay-updates.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/delay-updates.test b/testsuite/delay-updates.test index 54961dfa9..5896a9c7c 100644 --- a/testsuite/delay-updates.test +++ b/testsuite/delay-updates.test @@ -8,14 +8,14 @@ mkdir "$fromdir" echo 1 > "$fromdir/foo" -checkit "$RSYNC -avvv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" +checkit "$RSYNC -aiv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" mkdir "$todir/.~tmp~" echo 2 > "$todir/.~tmp~/foo" touch -r .. "$todir/.~tmp~/foo" "$todir/foo" echo 3 > "$fromdir/foo" -checkit "$RSYNC -avvv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" +checkit "$RSYNC -aiv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" # The script would have aborted on error, so getting here means we've won. exit 0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor