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 1176215807A for ; Thu, 05 Jun 2025 11:22:32 +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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id D52EA343183 for ; Thu, 05 Jun 2025 11:22:31 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 068EB1104A8; Thu, 05 Jun 2025 11:22:17 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 01B6F1104A7 for ; Thu, 05 Jun 2025 11:22:16 +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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AF5BC343135 for ; Thu, 05 Jun 2025 11:22:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1DEAD2921 for ; Thu, 05 Jun 2025 11:22:14 +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: <1749122526.57c25a1d527d12b7b5a1f0c2f2c181db0881f06c.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ecompress X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 57c25a1d527d12b7b5a1f0c2f2c181db0881f06c X-VCS-Branch: master Date: Thu, 05 Jun 2025 11:22:14 +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: e5c54b30-ba32-41ff-9038-f44602038d05 X-Archives-Hash: f3c3b085ec567ac06c99dedf8aff156c commit: 57c25a1d527d12b7b5a1f0c2f2c181db0881f06c Author: Kerin Millar plushkava net> AuthorDate: Wed Aug 10 23:31:23 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jun 5 11:22:06 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=57c25a1d ecompress: correct the indentation within fix_symlinks() The fix_symlinks() function employs a read loop that is nested within an infinite loop. Have the use of indentation reflect this. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/ecompress | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/bin/ecompress b/bin/ecompress index 609814ccaf..620abfdb1a 100755 --- a/bin/ecompress +++ b/bin/ecompress @@ -166,33 +166,33 @@ fix_symlinks() { # levels of indirection (see bug #470916). local -i indirection=0 while true ; do - local something_changed= - while read -r -d $'\0' brokenlink ; do - [[ -e ${brokenlink} ]] && continue - - olddest=$(readlink "${brokenlink}") - newdest=${olddest}${PORTAGE_COMPRESS_SUFFIX} - if [[ "${newdest}" == /* ]] ; then - [[ -f "${D%/}${newdest}" ]] || continue - else - [[ -f "${brokenlink%/*}/${newdest}" ]] || continue - fi + local something_changed= + while read -r -d $'\0' brokenlink ; do + [[ -e ${brokenlink} ]] && continue + + olddest=$(readlink "${brokenlink}") + newdest=${olddest}${PORTAGE_COMPRESS_SUFFIX} + if [[ "${newdest}" == /* ]] ; then + [[ -f "${D%/}${newdest}" ]] || continue + else + [[ -f "${brokenlink%/*}/${newdest}" ]] || continue + fi - something_changed=${brokenlink} - rm -f "${brokenlink}" && - ln -snf "${newdest}" "${brokenlink}${PORTAGE_COMPRESS_SUFFIX}" - ((ret|=$?)) - done < <(find "${ED}" -type l -print0 || die) + something_changed=${brokenlink} + rm -f "${brokenlink}" && + ln -snf "${newdest}" "${brokenlink}${PORTAGE_COMPRESS_SUFFIX}" + ((ret|=$?)) + done < <(find "${ED}" -type l -print0 || die) - [[ -n ${something_changed} ]] || break - (( indirection++ )) + [[ -n ${something_changed} ]] || break + (( indirection++ )) - if (( indirection >= 100 )) ; then - # Protect against possibility of a bug triggering an endless loop. - eerror "ecompress: too many levels of indirection for" \ - "'${something_changed#${ED%/}}'" - break - fi + if (( indirection >= 100 )) ; then + # Protect against possibility of a bug triggering an endless loop. + eerror "ecompress: too many levels of indirection for" \ + "'${something_changed#${ED%/}}'" + break + fi done return ${ret}