3
0
Fork 0
forked from mirrors/nixpkgs

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

linux: fix generate-config's handling of "no-choice" options
This commit is contained in:
Linus Heckemann 2021-01-12 11:13:58 +01:00 committed by GitHub
commit 97c0e5d8a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = "";