stage-1 find-libs: initialise left to empty array

declare -a is not sufficient to make the array variable actually
exist, which resulted in the script failing when the target object did
not have any DT_NEEDED entries. This in turn resulted in some
initramfs libraries not having their rpaths patched to point to
extra-utils, which in turn broke the extra-utils tests.
This commit is contained in:
Linus Heckemann 2020-08-25 12:02:53 +02:00
parent 7b527223fd
commit 27f0ca6670

View File

@ -36,7 +36,7 @@ let
set -euo pipefail set -euo pipefail
declare -A seen declare -A seen
declare -a left left=()
patchelf="${pkgs.buildPackages.patchelf}/bin/patchelf" patchelf="${pkgs.buildPackages.patchelf}/bin/patchelf"
@ -48,7 +48,7 @@ let
done done
} }
add_needed $1 add_needed "$1"
while [ ''${#left[@]} -ne 0 ]; do while [ ''${#left[@]} -ne 0 ]; do
next=''${left[0]} next=''${left[0]}