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 BF832158074 for ; Fri, 04 Jul 2025 02:19:17 +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 ABC0D3420FE for ; Fri, 04 Jul 2025 02:19:17 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id CC639110562; Fri, 04 Jul 2025 02:19:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 B84E7110560 for ; Fri, 04 Jul 2025 02:19:04 +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 6495134203E for ; Fri, 04 Jul 2025 02:19:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9297B2CFC for ; Fri, 04 Jul 2025 02:19:01 +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: <1751595422.3b551d0e89d75d347ac7607c8002c0e1ac51bdd0.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: 3b551d0e89d75d347ac7607c8002c0e1ac51bdd0 X-VCS-Branch: master Date: Fri, 04 Jul 2025 02:19:01 +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: b92125e0-004f-4676-a8c6-5e8693829d2c X-Archives-Hash: c08675edd0d6aaa530ec1f2ad6da3e7b commit: 3b551d0e89d75d347ac7607c8002c0e1ac51bdd0 Author: Kerin Millar plushkava net> AuthorDate: Wed Jul 2 06:05:31 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri Jul 4 02:17:02 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3b551d0e emerge-webrsync: improve the diagnostic messages of sync_local() As concerns the sync_local() function, increase the granularity and utility of the informational messages that are shown. The revised messages convey the following information: - which utility is used to sync the repo, be it rsync(1) or tarsync - the point at which tarball extraction begins, if using rsync(1) - the location of the repo Further, refrain from issuing suppositional claims in the event that tar(1) or tarsync fail. There are various potential modes of failure and it is a stretch to imply that the tarball be corrupt after undergoing verification by checksum and - in most cases - by gemato or gpg(1). Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/emerge-webrsync | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index 541ca8d001..193f60bb8c 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -378,8 +378,6 @@ sync_local() { local ownership snapshot_dir local -a tarsync_opts rsync_opts - einfo "Syncing local repository ..." - if ! contains_word usersync "${FEATURES}"; then ownership="${PORTAGE_USERNAME}:${PORTAGE_GRPNAME}" elif [[ ${USERLAND} == BSD ]]; then @@ -389,6 +387,8 @@ sync_local() { fi || exit if hash tarsync 2>/dev/null; then + einfo "Using tarsync to refresh ${repo_location@Q} ..." + tarsync_opts=( -s 1 -e /distfiles -e /packages -e /local ) if chown "${ownership}" -- "${repo_location}" 2>/dev/null; then tarsync_opts+=( -o "${ownership%:*}" -g "${ownership#*:}" ) @@ -397,18 +397,24 @@ sync_local() { tarsync_opts+=( -v ) fi if ! tarsync "${tarsync_opts[@]}" -- "${file}" "${repo_location}"; then - eerror "tarsync failed; tarball is corrupt? (${file})" + file=${file##*/} + eerror "Failed to sync ${repo_location@Q} with ${file@Q}" return 1 fi else + einfo "Extracting ${file@Q} ..." + snapshot_dir=${tmpdir:?}/snapshot mkdir -- "${snapshot_dir}" && cd -- "${snapshot_dir}" || exit if ! do_tar "${file}" -x --strip-components=1 -f -; then - eerror "tar failed to extract the image. tarball is corrupt? (${file})" + file=${file##*/} + eerror "Failed to extract the contents of ${file@Q}" return 1 fi + einfo "Using rsync to refresh ${repo_location@Q} ..." + read -rd '' -a rsync_opts <<<"${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS}" if (( opt[quiet] )); then rsync_opts+=( -q )