Closed
Bug 1163248
Opened 10 years ago
Closed 10 years ago
checksetup.pl is unable to run if File::Slurp is missing
Categories
(Bugzilla :: Installation & Upgrading, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 6.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
(Keywords: regression)
Attachments
(1 file)
1.52 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
This is a regression in 5.1 due to bug 1143005. One of the first things that checksetup.pl does is to load Bugzilla::Install::Requirements to get the list of required and optional modules. Unfortunately, this module now uses File::Slurp which is not a core Perl module, and so if File::Slurp is not installed, checksetup.pl crashes before it had a chance to go any further.
Moreover, export_cpanfile() is called before checksetup.pl had a chance to check that all required Perl modules are installed, meaning that if File::Slurp is not installed, checksetup.pl will fail anyway because export_cpanfile() uses this module.
Finally, the admin gets no message that the cpanfile has been created, and so the admin is supposed to guess if the command succeeded and where to look for cpanfile.
![]() |
Assignee | |
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
Comment on attachment 8603672 [details] [diff] [review]
patch, v1
Review of attachment 8603672 [details] [diff] [review]:
-----------------------------------------------------------------
::: Bugzilla/Install/Requirements.pm
@@ +916,5 @@
> }
>
> # Write out the cpanfile to the document root
> + my $file = bz_locations()->{'libpath'} . '/cpanfile';
> + open(my $fh, '>', $file);
The parens are not needed. If they are desired, I would add some to close $fh for consistency.
![]() |
Assignee | |
Comment 3•10 years ago
|
||
(In reply to Dylan William Hardison [:dylan] from comment #2)
> The parens are not needed. If they are desired, I would add some to close
> $fh for consistency.
When you read:
http://perldoc.perl.org/functions/close.html
or
http://perldoc.perl.org/functions/open.html
you will note that it's pretty standard to use parens for open(), but not for close.
Comment 4•10 years ago
|
||
Comment on attachment 8603672 [details] [diff] [review]
patch, v1
Review of attachment 8603672 [details] [diff] [review]:
-----------------------------------------------------------------
r=dkl
Attachment #8603672 -
Flags: review?(dkl) → review+
Updated•10 years ago
|
Flags: approval?
![]() |
Assignee | |
Comment 5•10 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
ccda2ce..8ff02d6 master -> master
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•