From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 85A58158094 for ; Wed, 17 Aug 2022 03:26:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9AF0AE09BC; Wed, 17 Aug 2022 03:26:17 +0000 (UTC) Received: from smtp.gentoo.org (mail.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 77F51E09BC for ; Wed, 17 Aug 2022 03:26:17 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9EA36340ED4 for ; Wed, 17 Aug 2022 03:26:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C1AE4558 for ; Wed, 17 Aug 2022 03:26: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: <1660706771.36dbd3e4336fa199a35b4f74c1679511707138f5.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/estrip X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 36dbd3e4336fa199a35b4f74c1679511707138f5 X-VCS-Branch: master Date: Wed, 17 Aug 2022 03:26: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: 82a7c53d-bf69-40a1-967c-2587a980fc5b X-Archives-Hash: 9bef2b6a84abb7b9883edf591407b8fb commit: 36dbd3e4336fa199a35b4f74c1679511707138f5 Author: Sam James gentoo org> AuthorDate: Wed Aug 17 02:34:08 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Aug 17 03:26:11 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=36dbd3e4 estrip: consistently use an array for scanelf results Otherwise the new arithmetic-context test isn't going to work if we're in the simpler scanelf-directly case (non-cache). I should've spotted that we don't have an array in both branches. And while at it, adapt the find_paths test. Fixes: f35bf4828ac56b4ab4f7fb4ccc846ebdee33767d Thanks-to: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/estrip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/estrip b/bin/estrip index d7be51743..6738fb4d3 100755 --- a/bin/estrip +++ b/bin/estrip @@ -63,7 +63,7 @@ while [[ $# -gt 0 ]] ; do fi done - if [[ ${find_paths[@]} ]]; then + if (( ${#find_paths[@]} )); then # We can avoid scanelf calls for binaries we already # checked in install_qa_check (where we generate # NEEDED for everything installed). @@ -98,7 +98,7 @@ while [[ $# -gt 0 ]] ; do done done < "${PORTAGE_BUILDDIR}"/build-info/NEEDED else - scanelf_results=$(scanelf -yqRBF '#k%F' -k '.symtab' "${find_paths[@]}") + mapfile -t scanelf_results < <(scanelf -yqRBF '#k%F' -k '.symtab' "${find_paths[@]}") fi while IFS= read -r path; do