Bug 999296: make checksetup.pl not complain about having added new

values to localconfig when the answers were supplied by an answer file.
r=LpSolit, a=justdave


git-svn-id: svn://10.0.0.236/trunk@265377 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2014-05-02 02:30:46 +00:00
parent 06020872ed
commit bdc9ffd820
3 changed files with 10 additions and 4 deletions

View File

@ -1 +1 @@
9014
9015

View File

@ -1 +1 @@
7c6963dd64b89fd63810d694da90762d7273aaf7
082cea0bf161689e2c45750d364c87b46dc87089

View File

@ -224,12 +224,18 @@ sub update_localconfig {
and length($value) == 256);
if (!defined $value) {
push(@new_vars, $name);
$var->{default} = &{$var->{default}} if ref($var->{default}) eq 'CODE';
if (exists $answer->{$name}) {
$localconfig->{$name} = $answer->{$name};
}
else {
# If the user did not supply an answers file, then they get
# notified about every variable that gets added. If there was
# an answer file, then we don't notify about site_wide_secret
# because we assume the intent was to auto-generate it anyway.
if (!scalar(keys %$answer) || $name ne 'site_wide_secret') {
push(@new_vars, $name);
}
$localconfig->{$name} = $var->{default};
}
}