commit: 4ee9caca31ad32d41f70835f83bf50ba50698108
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Thu Jul 3 16:48:12 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 4 02:17:04 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4ee9caca
emerge-webrsync: show only the tarball basename in sync_local()
Presently, the sync_local() function features several informational and
diagnostic messages that convey the name of the tarball. However, some
of them show only its filename, whereas others show its full pathname.
Consistently show only the filename.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/emerge-webrsync | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 2719e60486..c011c0cf6e 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -392,7 +392,7 @@ get_snapshot_timestamp() {
sync_local() {
local file=$1
- local ownership snapshot_dir
+ local snapshot_dir ownership tarball
local -a tarsync_opts rsync_opts
if ! contains_word usersync "${FEATURES}"; then
@@ -403,6 +403,8 @@ sync_local() {
ownership=$(stat -c '%U:%G' -- "${repo_location}")
fi || exit
+ tarball=${file##*/}
+
if hash tarsync 2>/dev/null; then
einfo "Using tarsync to refresh ${repo_location@Q} ..."
@@ -414,19 +416,17 @@ sync_local() {
tarsync_opts+=( -v )
fi
if ! tarsync "${tarsync_opts[@]}" -- "${file}"
"${repo_location}"; then
- file=${file##*/}
- eerror "Failed to sync ${repo_location@Q} with
${file@Q}"
+ eerror "Failed to sync ${repo_location@Q} with
${tarball@Q}"
return 1
fi
else
- einfo "Extracting ${file@Q} ..."
+ einfo "Extracting ${tarball@Q} ..."
snapshot_dir=${tmpdir:?}/snapshot
mkdir -- "${snapshot_dir}" && cd -- "${snapshot_dir}" || exit
if ! do_tar "${file}" -x --strip-components=1 -f -; then
- file=${file##*/}
- eerror "Failed to extract the contents of ${file@Q}"
+ eerror "Failed to extract the contents of ${tarball@Q}"
return 1
fi