about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/kernel/generate-config.pl
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/kernel/generate-config.pl')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/generate-config.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/generate-config.pl b/nixpkgs/pkgs/os-specific/linux/kernel/generate-config.pl
index 26c559ea9086..6a2aec809a1b 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/generate-config.pl
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/generate-config.pl
@@ -61,6 +61,12 @@ sub runConfig {
             # Remember choice alternatives ("> 1. bla (FOO)" or " 2. bla (BAR) (NEW)").
             if ($line =~ /^\s*>?\s*(\d+)\.\s+.*?\(([A-Za-z0-9_]+)\)(?:\s+\(NEW\))?\s*$/) {
                 $choices{$2} = $1;
+            } else {
+                # The list of choices has ended without us being
+                # asked. This happens for options where only one value
+                # is valid, for instance. The results can foul up
+                # later options, so forget about it.
+                %choices = ();
             }
 
             $line = "";