summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Mysql.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-12-09 20:51:33 +0100
committerlpsolit%gmail.com <>2006-12-09 20:51:33 +0100
commitaccd734fd5a4ac2d242997c110c1924844219ba7 (patch)
tree2f82a2be166e2aea8bf75cc6aaa17374f0d9534a /Bugzilla/DB/Mysql.pm
parent850da7d0ea8233e343d31f159a9f21c18b0f1390 (diff)
downloadbugzilla-accd734fd5a4ac2d242997c110c1924844219ba7.tar.gz
bugzilla-accd734fd5a4ac2d242997c110c1924844219ba7.tar.xz
Bug 361252: checksetup.pl should get confirmation from the user before causing dataloss in UTF8 conversion - Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit a=myk
Diffstat (limited to 'Bugzilla/DB/Mysql.pm')
-rw-r--r--Bugzilla/DB/Mysql.pm21
1 files changed, 18 insertions, 3 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 4335a1b2f..a8210a972 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -43,6 +43,7 @@ package Bugzilla::DB::Mysql;
use strict;
+use Bugzilla::Constants;
use Bugzilla::Util;
use Bugzilla::Error;
@@ -349,7 +350,7 @@ sub bz_setup_database {
. "If you would like to cancel, press Ctrl-C now..."
. " (Waiting 45 seconds...)\n\n";
# Wait 45 seconds for them to respond.
- sleep(45);
+ sleep(45) unless Bugzilla->installation_answers->{NO_PAUSE};
}
print "Renaming indexes...\n";
@@ -566,9 +567,23 @@ WARNING: We are about to convert your table storage format to UTF8. This
If you ever used a version of Bugzilla before 2.22, we STRONGLY
recommend that you stop checksetup.pl NOW and run contrib/recode.pl.
- Continuing in 60 seconds...
EOT
- sleep 60;
+
+ if (!Bugzilla->installation_answers->{NO_PAUSE}) {
+ if (Bugzilla->installation_mode ==
+ INSTALLATION_MODE_NON_INTERACTIVE)
+ {
+ print <<EOT;
+ Re-run checksetup.pl in interactive mode (without an 'answers' file)
+ to continue.
+EOT
+ exit;
+ }
+ else {
+ print " Press Enter to continue or Ctrl-C to exit...";
+ getc;
+ }
+ }
print "Converting table storage format to UTF-8. This may take a",
" while.\n";