From 45325b1d24f4f91df5181881093af3c7412c7488 Mon Sep 17 00:00:00 2001 From: Niklas Hambüchen Date: Mon, 13 Jul 2020 02:16:43 +0200 Subject: install-grub.pl: Fix GRUB always reinstalling. (#92756) See https://github.com/NixOS/nixpkgs/pull/92520#issuecomment-655157990. In #85895 I accidentally introduced a comparison between an array reference and an array, which can never be true. Fixed by dereferencing. --- nixos/modules/system/boot/loader/grub/install-grub.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index 9af799184b6..5d7f58e7c73 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -652,7 +652,7 @@ my @deviceTargets = getList('devices'); my $prevGrubState = readGrubState(); my @prevDeviceTargets = split/,/, $prevGrubState->devices; my @extraGrubInstallArgs = getList('extraGrubInstallArgs'); -my @prevExtraGrubInstallArgs = $prevGrubState->extraGrubInstallArgs; +my @prevExtraGrubInstallArgs = @{$prevGrubState->extraGrubInstallArgs}; my $devicesDiffer = scalar (List::Compare->new( '-u', '-a', \@deviceTargets, \@prevDeviceTargets)->get_symmetric_difference()); my $extraGrubInstallArgsDiffer = scalar (List::Compare->new( '-u', '-a', \@extraGrubInstallArgs, \@prevExtraGrubInstallArgs)->get_symmetric_difference()); -- cgit 1.4.1