Closed Bug 127524 Opened 23 years ago Closed 23 years ago fails with XML::Parser error.


(Bugzilla :: Installation & Upgrading, defect, P1)




Bugzilla 2.16


(Reporter: gerv, Assigned: zach)



(1 file, 2 obsolete files)

When I pull a new 2.15 tree and run, the following happens:

Checking perl modules ...
Checking for             DBI (v1.13)   ok: found v1.15
Checking for    Data::Dumper (any)     ok: found v2.102
Checking for      DBD::mysql (v1.2209) ok: found v2.0416
Checking for     Date::Parse (any)     ok: found v2.20
Checking for       AppConfig (v1.52)   ok: found v1.52
Checking for        Template (v2.06)   ok: found v2.06
Checking for      Text::Wrap (v2001.0131) ok: found v2001.0131
Checking for       CGI::Carp (any)     ok: found v1.20

The following Perl modules are optional:
Checking for              GD (v1.19)   ok: found v1.33
Checking for     Chart::Base (v0.99)   ok: found v0.99
Checking for     XML::Parser (any)      not found

If you want to use the bug import/export feature to move bugs to or from
other bugzilla installations, you will need to install the XML::Parser module by
running (as root)

   perl -MCPAN -e'install "XML::Parser"'

Checking user setup ...

An error has occurred while reading your
'localconfig' file.  The text of the error message is:
Uncaught exception from user code:
        Can't locate XML/ in @INC (@INC contains:
/usr/local/lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl
.) at ./ line 166.
        eval {...} called at ./ line 166
        main::have_vers('XML::Parser', 0) called at ./ line 210
Please fix the error in your 'localconfig' file.
Alternately rename your 'localconfig' file, rerun, and re-enter your answers.
  $ mv -f localconfig localconfig.old
  $ ./
Uncaught exception from user code:
        Syntax error in localconfig at ./ line 285.

No localconfig file is generated. The same error appears running
multiple times. I have to get around this by stealing a localconfig file from an
earlier Bugzilla.

We can't ship like this :-)

Severity: normal → blocker
Target Milestone: --- → Bugzilla 2.16
What is happening is that $@ is getting set when the module detection 
finds that XML::Parser is missing and isn't getting reset when the 
localconfig checks start. I have a one line patch I'm about to push here. 
Gerv, can you please review and 2nd review?

Priority: -- → P1
Attached patch Patch v1 (obsolete) — Splinter Review
This patch sets $@ to undef to clear it before checking localconfig. I think it
will work, but since all my systems have XML::Parser, I cannot be sure.
Keywords: review
Attachment #71216 - Attachment is obsolete: true
OK. Now completes, but there is this error:

Checking user setup ...
Use of uninitialized value in string ne at ./ line 270 (#1)
    (W uninitialized) An undefined value was used as if it were already
    defined.  It was interpreted as a "" or a 0, but maybe it was a mistake.
    To suppress this warning assign a defined value to your variables.
    To help you figure out what was undefined, perl tells you what operation
    you used the undefined value in.  Note, however, that perl optimizes your
    program and the operation displayed in the warning may not necessarily
    appear literally in your program.  For example, "that $foo" is
    usually optimized into "that " . $foo, and the warning will refer to
    the concatenation (.) operator, even though there is no . in your

I think you need to check for "defined" on that line - or rather, just say "if $@".

Keywords: review
Comment on attachment 71235 [details] [diff] [review]
patch v1.0.1 - without the mac binary headers

marking needs-work on behalf of Gerv in comment #5
Attachment #71235 - Flags: review-
This addresses Gerv's comment #5 and uses his fix.
regarding attachement 72076
I tested it with and without XML::Parser on a new checkout and an existing
checkout and it seems to work ok.
r=burnus if it is worth anything
(Yes I now I attached this patch, but I only combined 1.0.1 with comment #5)
Comment on attachment 72076 [details] [diff] [review]
patch v1.0.2 - with if ($@) check

Interesting though... I don't have XML::Parser installed on this box, and I'm
not getting the error even without this patch applied.	But it works well with
it, too, and it looks like it's doing the right thing.
Attachment #72076 - Flags: review+
Attachment #71235 - Attachment is obsolete: true
Comment on attachment 72076 [details] [diff] [review]
patch v1.0.2 - with if ($@) check

Attachment #72076 - Flags: review+
Checking in;
/cvsroot/mozilla/webtools/bugzilla/,v  <--
new revision: 1.126; previous revision: 1.125
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.