Closed Bug 999296 Opened 11 years ago Closed 11 years ago

checksetup.pl complains about variables you need to check even if you explicitly set them via an answers file

Categories

(Bugzilla :: Installation & Upgrading, defect)

4.5.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: justdave, Assigned: justdave)

Details

Attachments

(1 file, 3 obsolete files)

This was reported on IRC the other day, and the reporter never filed a bug, but I don't want to lose it. When deploying a Bugzilla with an answers file which explicitly contains everything that needs to go into localconfig, checksetup.pl stops after creating the localconfig file, complaining that new values were added to it that you might want to check before continuing, and then listing off everything in localconfig. Thus when deploying in an automated fashion (the reporter was writing a puppet module to do the deployment) he had to run checksetup.pl twice for the initial install to work. checksetup shouldn't count the addition of a variable to localconfig as a new variable if the value was explicitly provided by an answers file. I have a patch coming momentarily.
Attached patch Patch v1 (obsolete) (deleted) — Splinter Review
Don't push the variable name onto @new_vars unless we actually use a default value to set it.
Attachment #8410032 - Flags: review?(LpSolit)
Attached patch Patch v2 (obsolete) (deleted) — Splinter Review
Attachment #8410495 - Flags: review?(LpSolit)
er, I touched something funny, I didn't mean to submit yet there. New patch also doesn't push onto @new_vars if an answer file was supplied but didn't include a site_wide_secret, because it's good form to let the installer generate that anyway and not supply it, and we don't want to trip up installation if the user does that. We still notify the user if we generated it in interactive mode though.
Attachment #8410032 - Attachment is obsolete: true
Attachment #8410032 - Flags: review?(LpSolit)
(In reply to Dave Miller [:justdave] (justdave@bugzilla.org) from comment #0) > This was reported on IRC the other day, and the reporter never filed a bug, > but I don't want to lose it. diegodnova@gmail.com was the reporter for what it's worth, he didn't have a bugzilla account at the time so I couldn't CC him.
Comment on attachment 8410495 [details] [diff] [review] Patch v2 >+ if (!(($name eq 'site_wide_secret') && (scalar(keys %$answer) > 0))) { I think: if (!scalar(keys %$answer) || $name ne 'site_wide_secret') would be more readable. I had to ask on IRC to understand it correctly. >+ push @new_vars, $var); Problem with parens.
Attachment #8410495 - Flags: review?(LpSolit) → review-
Don't know if you want it for 4.4 too, so I will let you set the target milestone.
Assignee: installation → justdave
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Attached patch Patch v3 (obsolete) (deleted) — Splinter Review
Yeah, I agree, that's easier to parse. Updated.
Attachment #8410495 - Attachment is obsolete: true
Attachment #8415360 - Flags: review?(LpSolit)
(In reply to Frédéric Buclin from comment #6) > Don't know if you want it for 4.4 too Yeah, probably should. Set as so.
Target Milestone: --- → Bugzilla 4.4
Comment on attachment 8415360 [details] [diff] [review] Patch v3 >- push(@new_vars, $name); >+ push(@new_vars, $var); Err... you want to push $name, not $var, else you get: This version of Bugzilla contains some variables that you may want to change and adapt to your local settings. The following variables are new to ./localconfig since you last ran checksetup.pl: HASH(0xc269838), HASH(0xc28b570), HASH(0xc28b5b0), HASH(0xc28b600), HASH(0xc28bf60), HASH(0xc28bfa0), HASH(0xc28bfe0), HASH(0xc295c18),
Attachment #8415360 - Flags: review?(LpSolit) → review-
Attached patch Patch v4 (deleted) — Splinter Review
Doh. where the hell was my brain?
Attachment #8415360 - Attachment is obsolete: true
Attachment #8415363 - Flags: review?(LpSolit)
Comment on attachment 8415363 [details] [diff] [review] Patch v4 r=LpSolit
Attachment #8415363 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval4.4?
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
Trunk: To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 7c6963d..082cea0 master -> master 4.4: To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 3b4ddd1..6be81e8 4.4 -> 4.4
Status: ASSIGNED → RESOLVED
Closed: 11 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: