From: Frédéric Buclin Date: Tue, 10 Jan 2012 23:00:53 +0000 (+0100) Subject: Bug 716227: When checksetup.pl tells the admin that he should edit variables in local... X-Git-Tag: bugzilla-4.2rc2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afe30321a8c67892b8286b497eb12ad8472763f7;p=thirdparty%2Fbugzilla.git Bug 716227: When checksetup.pl tells the admin that he should edit variables in localconfig, the message should be red r=timello a=LpSolit --- diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index 1ee7aca673..1544e6fac6 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -32,12 +32,13 @@ use strict; use Bugzilla::Constants; use Bugzilla::Install::Util qw(bin_loc install_string); -use Bugzilla::Util qw(generate_random_password); +use Bugzilla::Util qw(generate_random_password wrap_hard); use Data::Dumper; use File::Basename qw(dirname); use IO::File; use Safe; +use Term::ANSIColor; use base qw(Exporter); @@ -274,8 +275,10 @@ sub update_localconfig { if (@new_vars) { my $newstuff = join(', ', @new_vars); - print "\n", install_string('lc_new_vars', - { localconfig => $filename, new_vars => $newstuff }), "\n"; + print "\n"; + print colored(install_string('lc_new_vars', { localconfig => $filename, + new_vars => wrap_hard($newstuff, 70) }), + COLOR_ERROR), "\n"; exit; } diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index 6faf7844c3..36c3fe252d 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -60,7 +60,7 @@ EOT commands_optional => 'COMMANDS TO INSTALL OPTIONAL MODULES:', commands_required => < <<'END', Re-run checksetup.pl in interactive mode (without an 'answers' file) @@ -139,12 +139,14 @@ END ERROR: Using install-module.pl requires that you install "make". END lc_new_vars => <<'END', -This version of Bugzilla contains some variables that you may want to -change and adapt to your local settings. Please edit the file -##localconfig## and then rerun checksetup.pl. +This version of Bugzilla contains some variables that you may want to +change and adapt to your local settings. The following variables are +new to ##localconfig## since you last ran checksetup.pl: -The following variables are new to ##localconfig## since you last ran -checksetup.pl: ##new_vars## +##new_vars## + +Please edit the file ##localconfig## and then re-run checksetup.pl +to complete your installation. END lc_old_vars => <<'END', The following variables are no longer used in ##localconfig##, and