summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2020-07-13 02:16:43 +0200
committerGitHub <noreply@github.com>2020-07-13 02:16:43 +0200
commit45325b1d24f4f91df5181881093af3c7412c7488 (patch)
tree310d9929bcb8192d5f093d238ba6b163819dafdd
parent28f1c45e290ab247bcc8011f81d62bf22ba8c7b6 (diff)
downloadnixpkgs-45325b1d24f4f91df5181881093af3c7412c7488.tar
nixpkgs-45325b1d24f4f91df5181881093af3c7412c7488.tar.gz
nixpkgs-45325b1d24f4f91df5181881093af3c7412c7488.tar.bz2
nixpkgs-45325b1d24f4f91df5181881093af3c7412c7488.tar.lz
nixpkgs-45325b1d24f4f91df5181881093af3c7412c7488.tar.xz
nixpkgs-45325b1d24f4f91df5181881093af3c7412c7488.tar.zst
nixpkgs-45325b1d24f4f91df5181881093af3c7412c7488.zip
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.
-rw-r--r--nixos/modules/system/boot/loader/grub/install-grub.pl2
1 files changed, 1 insertions, 1 deletions
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());