commit:     0561aee1a5971bde72ceb9895189b8b68144cf20
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue Jun 10 00:22:13 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 11 03:26:22 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=0561aee1

estrip: drop the strip_flags variable from process_elf()

Drop the 'strip_flags' variable from the process_elf() function. The
purpose it served is fulfilled by the positional parameters themselves.

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

 bin/estrip | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bin/estrip b/bin/estrip
index 250c943833..4b7f278ebe 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -194,7 +194,8 @@ save_elf_debug() {
 
 # Usage: process_elf <elf>
 process_elf() {
-       local x=$1 inode_link=$2 strip_flags=("${@:3}")
+       local x=$1 inode_link=$2
+       shift 2
        local ed_noslash=${ED%/}
        local already_stripped xt_data
        local lockfile=${inode_link}_lockfile
@@ -230,7 +231,7 @@ process_elf() {
                        local 
splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID}"
 
                        if (( ! already_stripped )); then
-                               "${name_of[strip]}" "${strip_flags[@]}" -f 
"${splitdebug}" -F "${shortname}" "${x}"
+                               "${name_of[strip]}" "$@" -f "${splitdebug}" -F 
"${shortname}" "${x}"
                        fi
                        save_elf_debug "${x}" "${inode_link}_debug" 
"${splitdebug}"
                else
@@ -238,7 +239,7 @@ process_elf() {
                                save_elf_debug "${x}" "${inode_link}_debug"
                        fi
                        if (( ! already_stripped )); then
-                               "${name_of[strip]}" "${strip_flags[@]}" "${x}"
+                               "${name_of[strip]}" "$@" "${x}"
                        fi
                fi
        fi

Reply via email to