diff options
author | Anders Kaseorg <andersk@mit.edu> | 2019-12-05 02:02:16 -0800 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2019-12-08 21:17:24 +0100 |
commit | 04577a28d6212c63b00751576610b47e13fdf522 (patch) | |
tree | 220b1d9db57b2f0e5a362f558f0a35caa26f4742 /pkgs/os-specific | |
parent | 9e144d552743cb6b41c457e888d13000cad229c1 (diff) | |
download | nixpkgs-04577a28d6212c63b00751576610b47e13fdf522.tar nixpkgs-04577a28d6212c63b00751576610b47e13fdf522.tar.gz nixpkgs-04577a28d6212c63b00751576610b47e13fdf522.tar.bz2 nixpkgs-04577a28d6212c63b00751576610b47e13fdf522.tar.lz nixpkgs-04577a28d6212c63b00751576610b47e13fdf522.tar.xz nixpkgs-04577a28d6212c63b00751576610b47e13fdf522.tar.zst nixpkgs-04577a28d6212c63b00751576610b47e13fdf522.zip |
kernel generate-config.pl: Show all errors, not just the first
This makes it less frustrating to add a large group of kernel options via boot.kernelPatches.*.extraConfig. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kernel/generate-config.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kernel/generate-config.pl b/pkgs/os-specific/linux/kernel/generate-config.pl index 26fc07202bb..26c559ea908 100644 --- a/pkgs/os-specific/linux/kernel/generate-config.pl +++ b/pkgs/os-specific/linux/kernel/generate-config.pl @@ -136,10 +136,12 @@ while (<CONFIG>) { } close CONFIG; +my $ret = 0; foreach my $name (sort (keys %answers)) { my $f = $requiredAnswers{$name} && $ignoreConfigErrors ne "1" - ? sub { die "error: " . $_[0]; } : sub { warn "warning: " . $_[0]; }; + ? sub { warn "error: " . $_[0]; $ret = -1; } : sub { warn "warning: " . $_[0]; }; &$f("unused option: $name\n") unless defined $config{$name}; &$f("option not set correctly: $name (wanted '$answers{$name}', got '$config{$name}')\n") if $config{$name} && $config{$name} ne $answers{$name}; } +exit $ret; |