From 46317c3190e95cca62cd5d932bd6bc4b45e75d23 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Sat, 18 Sep 2010 16:24:06 -0700 Subject: Bug 586244: Make mod_headers and mod_expires optional r=glob, a=mkanat --- Bugzilla/DB.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Bugzilla/DB.pm') diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 26e147f1f..6f1d3e6de 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -202,16 +202,19 @@ EOT # And now check the version of the database server itself. my $dbh = _get_no_db_connection(); - printf("Checking for %15s %-9s ", $sql_server, "(v$sql_want)") - if $output; my $sql_vers = $dbh->bz_server_version; $dbh->disconnect; + my $version_ok = vers_cmp($sql_vers, $sql_want) > -1 ? 1 : 0; + if ($output) { + Bugzilla::Install::Requirements::_checking_for({ + package => $sql_server, wanted => $sql_want, + found => $sql_vers, ok => $version_ok }); + } + # Check what version of the database server is installed and let # the user know if the version is too old to be used with Bugzilla. - if ( vers_cmp($sql_vers,$sql_want) > -1 ) { - print "ok: found v$sql_vers\n" if $output; - } else { + if (!$version_ok) { die <