commit:     57c25a1d527d12b7b5a1f0c2f2c181db0881f06c
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Wed Aug 10 23:31:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> 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}

Reply via email to