commit:     de7dbef028b087bf8a758e09fbadd641f54cd74b
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Jun 23 09:21:45 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 23 10:37:27 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=de7dbef0

emerge-webrsync: don't delete downloaded files after calling sync_local()

As concerns the do_snapshot() function, refrain from deleting the
downloaded files after having successfully called the sync_local()
function in the event that the --keep option was not specified. There is
no need to do so because, where the 'DISTDIR' variable is set to the
value of 'tmpdir', it is already guaranteed that the files will be
removed by the cleanup() function.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/emerge-webrsync | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 835405a1d7..4b84483078 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -525,8 +525,7 @@ do_snapshot() {
        done
 
        if (( have_files )); then
-               sync_local "${DISTDIR}/${file}" \
-               && { (( opt[keep] )) || rm -f -- 
"${DISTDIR}"/{"$file","$digest","$signature"}; }
+               sync_local "${DISTDIR}/${file}"
        else
                ewarn "${date} snapshot was not found"
                false

Reply via email to