git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107181 from lheckemann/generate-config-fix

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

commit97c0e5d8a887eddb5bc3d7c834c8aa2367d6b2d7 authorLinus Heckemann <git@sphalerite.org> dateTue 12 Jan 2021, 11:13 (6 years ago) parent5cbe85d16c0697
1 file changed+6
pkgs/os-specific/linux/kernel/generate-config.pl+6
pkgs/os-specific/linux/kernel/generate-config.pl+6
@@ -61,6 +61,12 @@ sub runConfig {
6161 # Remember choice alternatives ("> 1. bla (FOO)" or " 2. bla (BAR) (NEW)").
6262 if ($line =~ /^\s*>?\s*(\d+)\.\s+.*?\(([A-Za-z0-9_]+)\)(?:\s+\(NEW\))?\s*$/) {
6363 $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 = ();
6470 }
6571
6672 $line = "";