Merge pull request #107181 from lheckemann/generate-config-fix

linux: fix generate-config's handling of "no-choice" options

authored by Linus Heckemann and committed by GitHub 97c0e5d8 5cbe85db

+6
+6
pkgs/os-specific/linux/kernel/generate-config.pl
··· 61 61 # Remember choice alternatives ("> 1. bla (FOO)" or " 2. bla (BAR) (NEW)"). 62 62 if ($line =~ /^\s*>?\s*(\d+)\.\s+.*?\(([A-Za-z0-9_]+)\)(?:\s+\(NEW\))?\s*$/) { 63 63 $choices{$2} = $1; 64 + } else { 65 + # The list of choices has ended without us being 66 + # asked. This happens for options where only one value 67 + # is valid, for instance. The results can foul up 68 + # later options, so forget about it. 69 + %choices = (); 64 70 } 65 71 66 72 $line = "";