commit: e2dc868b32deace30a470384969cd8f0fe6a1c43
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Jun 22 04:04:53 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 22 10:57:01 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e2dc868b
emerge-webrsync: use if instead of a control operator in sync_local()
As regards the sync_local() function, use the if command to determine
whether rsync(1) failed, rather than the "||" control operator. Also,
don't employ ${param%%word} expansion where ${param%word} suffices.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/emerge-webrsync | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 2717bf8e39..08eebcca46 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -427,10 +427,10 @@ sync_local() {
fi
chmod 755 .
- rsync "${rsync_opts[@]}" -- . "${repo_location%%/}" || {
+ if ! rsync "${rsync_opts[@]}" -- . "${repo_location%/}"; then
eerror "rsync failed: $?"
die "Aborting because of rsync failure"
- }
+ fi
einfo "Cleaning up ..."
fi