commit:     0d2696173a25dde2e3f61a8ea72aeb92f8a29615
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Thu Jun  5 19:00:27 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun  7 22:54:10 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=0d269617

ecompress: refrain from using the integer attribute

The only discernible purpose of the integer attribute is to entice
inexperienced bash programmers into improving their bug yield.

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

 bin/ecompress | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/bin/ecompress b/bin/ecompress
index ec74bdfc25..a1f7ea9216 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -123,8 +123,7 @@ guess_suffix() {
 }
 
 fix_symlinks() {
-       local something_changed brokenlink newdest olddest ret
-       local -i indirection=0
+       local something_changed brokenlink newdest olddest ret i
 
        # Repeat until nothing changes, in order to handle multiple
        # levels of indirection (see bug #470916).
@@ -149,7 +148,7 @@ fix_symlinks() {
 
                if (( ! something_changed )); then
                        break
-               elif (( ++indirection >= 100 )); then
+               elif (( ++i >= 100 )); then
                        # Protect against possibility of a bug triggering an 
endless loop.
                        eerror "ecompress: too many levels of indirection for" \
                                "'${something_changed#${ED%/}}'"

Reply via email to