From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A6A45158074 for ; Mon, 23 Jun 2025 10:37:55 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 9291D341990 for ; Mon, 23 Jun 2025 10:37:55 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 23A5211055F; Mon, 23 Jun 2025 10:37:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 178E111055E for ; Mon, 23 Jun 2025 10:37:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CB9F93410BF for ; Mon, 23 Jun 2025 10:37:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8B8C22A76 for ; Mon, 23 Jun 2025 10:37:38 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1750675047.8c46c6a567cf7d8e44f0c855b05589a482d9792e.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/emerge-webrsync X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8c46c6a567cf7d8e44f0c855b05589a482d9792e X-VCS-Branch: master Date: Mon, 23 Jun 2025 10:37:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 63a8d9fd-fd43-443c-8608-78912bbe7545 X-Archives-Hash: 9b5ad37fac91f5e681a0651325559880 commit: 8c46c6a567cf7d8e44f0c855b05589a482d9792e Author: Kerin Millar plushkava net> AuthorDate: Mon Jun 23 09:11:40 2025 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jun 23 10:37:27 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8c46c6a5 emerge-webrsync: fix exit status reporting for rsync in sync_local() As concerns the sync_local() function, a recent commit altered the method by which rsync(1) is detected to have failed, by using the if command. In many cases, such would be acceptable. However, in this particular case, the diagnostic message expects to convey the exit status of the utility, which is clobbered by if. Address the issue by once again using the "||" control operator in conjunction with a compound command. Further, improve the quality of the diagnostic messages, both for eerror() and die(). Fixes: e2dc868b32deace30a470384969cd8f0fe6a1c43 Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/emerge-webrsync | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index f94cf95147..835405a1d7 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -423,10 +423,10 @@ sync_local() { fi chmod 755 . - if ! rsync "${rsync_opts[@]}" -- . "${repo_location%/}"; then - eerror "rsync failed: $?" - die "Aborting because of rsync failure" - fi + rsync "${rsync_opts[@]}" -- . "${repo_location%/}" || { + eerror "rsync unexpectedly exited with a status of $?" + die "couldn't sync ${repo_location@Q} with ${PWD@Q}" + } fi if (( ! from_portage )) && contains_word metadata-transfer "${FEATURES}"; then