commit:     a6cb3fde38e92f94caa0ee3ba07e172184b70cd1
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Jun 20 00:51:54 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 20 05:45:36 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a6cb3fde

emerge-webrsync: render fetch_file() error handling more compact

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

 bin/emerge-webrsync | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index c451e02134..802a756f96 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -235,11 +235,7 @@ fetch_file() {
        einfo "Fetching file ${FILE} ..."
 
        # Already set DISTDIR=
-       eval "${FETCHCOMMAND} ${opts}"
-
-       if [[ $? -eq 0 && -s ${DISTDIR}/${FILE} ]] ; then
-               return 0
-       else
+       if ! eval "${FETCHCOMMAND} ${opts}" || [[ ! -s ${DISTDIR}/${FILE} ]]; 
then
                rm -f "${DISTDIR}/${FILE}"
                return 1
        fi

Reply via email to