From 27f0ca6670911a42349037ce41de5314dc585d33 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Tue, 25 Aug 2020 12:02:53 +0200 Subject: 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. --- nixos/modules/system/boot/stage-1.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index a04660fb56e7d..eee510d2c9519 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -36,7 +36,7 @@ let set -euo pipefail declare -A seen - declare -a left + left=() patchelf="${pkgs.buildPackages.patchelf}/bin/patchelf" @@ -48,7 +48,7 @@ let done } - add_needed $1 + add_needed "$1" while [ ''${#left[@]} -ne 0 ]; do next=''${left[0]} -- cgit 1.4.1