Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Wed, 17 Aug 2022 03:26:18
Message-Id: 1660706771.36dbd3e4336fa199a35b4f74c1679511707138f5.sam@gentoo
1 commit: 36dbd3e4336fa199a35b4f74c1679511707138f5
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 17 02:34:08 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 17 03:26:11 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=36dbd3e4
7
8 estrip: consistently use an array for scanelf results
9
10 Otherwise the new arithmetic-context test isn't going to work
11 if we're in the simpler scanelf-directly case (non-cache).
12
13 I should've spotted that we don't have an array in both
14 branches.
15
16 And while at it, adapt the find_paths test.
17
18 Fixes: f35bf4828ac56b4ab4f7fb4ccc846ebdee33767d
19 Thanks-to: Kerin Millar <kfm <AT> plushkava.net>
20 Signed-off-by: Sam James <sam <AT> gentoo.org>
21
22 bin/estrip | 4 ++--
23 1 file changed, 2 insertions(+), 2 deletions(-)
24
25 diff --git a/bin/estrip b/bin/estrip
26 index d7be51743..6738fb4d3 100755
27 --- a/bin/estrip
28 +++ b/bin/estrip
29 @@ -63,7 +63,7 @@ while [[ $# -gt 0 ]] ; do
30 fi
31 done
32
33 - if [[ ${find_paths[@]} ]]; then
34 + if (( ${#find_paths[@]} )); then
35 # We can avoid scanelf calls for binaries we already
36 # checked in install_qa_check (where we generate
37 # NEEDED for everything installed).
38 @@ -98,7 +98,7 @@ while [[ $# -gt 0 ]] ; do
39 done
40 done < "${PORTAGE_BUILDDIR}"/build-info/NEEDED
41 else
42 - scanelf_results=$(scanelf -yqRBF '#k%F' -k '.symtab' "${find_paths[@]}")
43 + mapfile -t scanelf_results < <(scanelf -yqRBF '#k%F' -k '.symtab' "${find_paths[@]}")
44 fi
45
46 while IFS= read -r path; do