Closed Bug 361252 Opened 18 years ago Closed 18 years ago

checksetup.pl should get confirmation from the user before causing dataloss in UTF8 conversion

Categories

(Bugzilla :: Installation & Upgrading, defect)

2.23.3
defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: justdave, Assigned: mkanat)

Details

Attachments

(1 file, 1 obsolete file)

As discussed on the newsgroup...  if it's going to cause dataloss, we
should require input from the operator before continuing if it's going
to delete things, instead of just giving them 60 seconds to abort.  If
we're running in non-interactive mode, just print an error and bail
(unless the override is included in the passed answers file).
It seems critical to me to fix this bug before releasing 2.23.4! Someone who used to run checksetup.pl and to go and take a coffee while checksetup.pl is running would hate to come back and see that some data has been deleted because he didn't cancell the process on time.
Severity: normal → major
Flags: blocking3.0?
Target Milestone: --- → Bugzilla 3.0
Agreed.
Flags: blocking3.0? → blocking3.0+
Attached patch v1 (obsolete) — Splinter Review
Okay. This could be slightly improved, but given the urgency (this blocks 2.23.4) I think it will be fine.
Assignee: installation → mkanat
Status: NEW → ASSIGNED
Attachment #247554 - Flags: review?(LpSolit)
Comment on attachment 247554 [details] [diff] [review]
v1

>Index: Bugzilla.pm

>+sub installation_mode {

>+    ($class->request_cache->{installation_mode} = $newval) if $newval;

This should be |if defined $newval|, else you won't be able to set it to 0.


>Index: checksetup.pl

>+Bugzilla->installation_mode(INSTALLATION_MODE_NON_INTERACTIVE) if $silent;

If you run |./checksetup.pl answer.data --verbose|, $silent = 0 and your non-interactive command will never end. You should check whether %answer exists rather than looking at $silent.



>Index: Bugzilla/DB/Mysql.pm

>+         Re-run checksetup.pl in interactive mode (without an 'answers' file)
>+         after you have run contrib/recode.pl

Nit: why should I run contrib/recode.pl if I don't want to? The sentence before this one says "recommend", but here it doesn't look like a recommandation. Maybe that's just me.
Attachment #247554 - Flags: review?(LpSolit) → review-
Attached patch v2Splinter Review
Okay! I made a way for any part of Bugzilla to get the %answer hash.

Also, this will fix a problem that I have with test-checksetup, where it pauses for 60 seconds on every test (and thus takes over an hour to complete).
Attachment #247554 - Attachment is obsolete: true
Attachment #247939 - Flags: review?(LpSolit)
Comment on attachment 247939 [details] [diff] [review]
v2

Looks good to me. r=LpSolit
Attachment #247939 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval? → approval+
No idea where Max is, so I'm commiting this patch myself as it's the last one required to release 2.23.4.

Checking in Bugzilla.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla.pm,v  <--  Bugzilla.pm
new revision: 1.54; previous revision: 1.53
done
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.547; previous revision: 1.546
done
Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.70; previous revision: 1.69
done
Checking in Bugzilla/Constants.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Constants.pm,v  <--  Constants.pm
new revision: 1.64; previous revision: 1.63
done
Checking in Bugzilla/Install.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install.pm,v  <--  Install.pm
new revision: 1.10; previous revision: 1.9
done
Checking in Bugzilla/DB/Mysql.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v  <--  Mysql.pm
new revision: 1.48; previous revision: 1.47
done
Checking in Bugzilla/Install/Localconfig.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Localconfig.pm,v  <--  Localconfig.pm
new revision: 1.8; previous revision: 1.7
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: