From 04577a28d6212c63b00751576610b47e13fdf522 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 5 Dec 2019 02:02:16 -0800 Subject: 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 --- pkgs/os-specific/linux/kernel/generate-config.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkgs/os-specific/linux/kernel') 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 () { } 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; -- cgit 1.4.1