Commit 47ee48a7 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 277502: Re-organize checksetup.pl to be understood more easily (make it a…

Bug 277502: Re-organize checksetup.pl to be understood more easily (make it a short series of subroutines) Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=justdave
parent 8af30bf5
...@@ -375,7 +375,8 @@ sub get_text { ...@@ -375,7 +375,8 @@ sub get_text {
my $message; my $message;
$template->process('global/message.txt.tmpl', $vars, \$message) $template->process('global/message.txt.tmpl', $vars, \$message)
|| ThrowTemplateError($template->error()); || ThrowTemplateError($template->error());
$message =~ s/^\s+//gm; # Remove the indenting that exists in messages.html.tmpl.
$message =~ s/^ //gm;
return $message; return $message;
} }
......
...@@ -25,6 +25,8 @@ package Bugzilla::Install::Requirements; ...@@ -25,6 +25,8 @@ package Bugzilla::Install::Requirements;
use strict; use strict;
use POSIX ();
use base qw(Exporter); use base qw(Exporter);
our @EXPORT = qw( our @EXPORT = qw(
REQUIRED_MODULES REQUIRED_MODULES
...@@ -33,6 +35,7 @@ our @EXPORT = qw( ...@@ -33,6 +35,7 @@ our @EXPORT = qw(
check_requirements check_requirements
check_graphviz check_graphviz
display_version_and_os
have_vers have_vers
vers_cmp vers_cmp
install_command install_command
...@@ -392,6 +395,20 @@ sub check_graphviz { ...@@ -392,6 +395,20 @@ sub check_graphviz {
return $return; return $return;
} }
sub display_version_and_os {
# Display version information
printf "\n* This is Bugzilla " . BUGZILLA_VERSION . " on perl %vd\n",
$^V;
my @os_details = POSIX::uname;
# 0 is the name of the OS, 2 is the major version,
my $os_name = $os_details[0] . ' ' . $os_details[2];
if (ON_WINDOWS) {
require Win32;
$os_name = Win32::GetOSName();
}
# 3 is the minor version.
print "* Running on $os_name $os_details[3]\n"
}
# This was originally clipped from the libnet Makefile.PL, adapted here to # This was originally clipped from the libnet Makefile.PL, adapted here to
# use the below vers_cmp routine for accurate version checking. # use the below vers_cmp routine for accurate version checking.
......
...@@ -282,6 +282,12 @@ ...@@ -282,6 +282,12 @@
Either this is your first time using [% terms.Bugzilla %], or your Either this is your first time using [% terms.Bugzilla %], or your
administrator's privileges might have accidentally been deleted. administrator's privileges might have accidentally been deleted.
[% ELSIF message_tag == "install_urlbase_default" %]
Now that you have installed [% terms.Bugzilla %], you should visit the
'Parameters' page (linked in the footer of the Administrator
account) to ensure it is set up as you wish - this includes
setting the 'urlbase' option to the correct url.
[% ELSIF message_tag == "product_invalid" %] [% ELSIF message_tag == "product_invalid" %]
[% title = "$terms.Bugzilla Component Descriptions" %] [% title = "$terms.Bugzilla Component Descriptions" %]
The product <em>[% product FILTER html %]</em> does not exist The product <em>[% product FILTER html %]</em> does not exist
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment