Closed Bug 342060 Opened 19 years ago Closed 19 years ago

checksetup fails if no database exists

Categories

(Bugzilla :: Installation & Upgrading, defect)

2.23
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: mkanat, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

If you try to run checksetup when no database exists, it will fail. I suspect this is because Bugzilla::Config is now trying to access the database before it exists.
The problem is that UpdateParams() at line 1202 has to call all Bugzilla::Config::* modules to get their default values in order to establish a complete list of parameters. But some parameters in BugFields.pm, such as priorities and platforms, are stored in the DB itself, not in their respective .pm, i.e. that these parameters are the only ones where the list of legal values is not "static" but freely editable. The only fix I can see is to create the DB before worrying about parameters. After all, checksetup.pl only requires variables from localconfig to create the DB. It doesn't care about other parameters at this point.
Attached patch patch, v1Splinter Review
We create the DB as soon as localconfig exists and is readable. This is required in order to populate data/params correctly, such as the default platform, OS, etc... The DB must be set up before the very first call to either Param(), SetParam() or UpdateParams(). Now starting from a fresh installation works fine agian.
Assignee: installation → LpSolit
Status: NEW → ASSIGNED
Attachment #226230 - Flags: review?(mkanat)
Comment on attachment 226230 [details] [diff] [review] patch, v1 Yeah, that looks fine. You just moved the code, so I didn't look over it in great detail. This might cause trouble if I want to check the UTF-8 param (in the future) when creating tables, but I think I'll be fine.
Attachment #226230 - Flags: review?(mkanat) → review+
Flags: approval?
Flags: approval? → approval+
I checked this in myself since it was causing the tinderbox to burn. Checking in checksetup.pl; /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl new revision: 1.494; previous revision: 1.493 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: regression
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: