]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 999296: make checksetup.pl not complain about having added new
authorDave Miller <justdave@mozilla.com>
Fri, 2 May 2014 02:08:39 +0000 (22:08 -0400)
committerDave Miller <justdave@mozilla.com>
Fri, 2 May 2014 02:08:39 +0000 (22:08 -0400)
values to localconfig when the answers were supplied by an answer file.
r=LpSolit, a=justdave

Bugzilla/Install/Localconfig.pm

index d469e13abff9943c430709894c275a9e2e3e0439..71a9c6ae089f8b3a6e6dcef1767060a6f7c16c9f 100644 (file)
@@ -222,14 +222,20 @@ sub update_localconfig {
         # a 256-character string for site_wide_secret.
         $value = undef if ($name eq 'site_wide_secret' and defined $value
                            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};
             }
         }