Closed
Bug 652047
Opened 14 years ago
Closed 12 years ago
checksetup.pl --check-modules fails to compile/run if the Voting extension is enabled on a fresh install
Categories
(Bugzilla :: Extensions, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: justdave, Assigned: LpSolit)
Details
Attachments
(2 files, 2 obsolete files)
1.08 KB,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
1.50 KB,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
[root@ip-admin02 bugzilla.mozilla.org]# ./checksetup.pl --check-modules
Can't locate Date/Parse.pm in @INC (@INC contains: . lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8) at Bugzilla/Util.pm line 52.
BEGIN failed--compilation aborted at Bugzilla/Util.pm line 52.
Compilation failed in require at Bugzilla/Error.pm line 33.
BEGIN failed--compilation aborted at Bugzilla/Error.pm line 33.
Compilation failed in require at Bugzilla/Extension.pm line 26.
BEGIN failed--compilation aborted at Bugzilla/Extension.pm line 26.
Compilation failed in require at (eval 13) line 3.
...propagated at /usr/lib/perl5/5.8.8/base.pm line 85.
BEGIN failed--compilation aborted at ./extensions/Voting/Extension.pm line 29.
Compilation failed in require at Bugzilla/Install/Util.pm line 179.
Comment 1•14 years ago
|
||
Oh interesting. Good to know. I suppose it's easy to work around. I wonder if we should just say that people can't enable extensions until after that point.
Although realistically, it shouldn't be failing at that point, because only the module's Config.pm should be being loaded. So we'll have to investigate what's wrong, there.
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → Bugzilla 4.0
Reporter | ||
Comment 2•14 years ago
|
||
I don't see a Config.pm in that module. Maybe that's the problem.
Comment 3•14 years ago
|
||
Ah, that would be the problem indeed. I should probably change the system to make that mandatory.
Comment 4•13 years ago
|
||
I just hit this problem, on our local builds... and felt I should document the research I did to figure out what was causing it.
The root cause, is the use Bugzilla; line. If you include that line in config.pm for example, this error will come back.
The problem is that when use Bugzilla is called, it triggers the
if ($INC{'Bugzilla.pm'}) {
return Bugzilla->extensions;
}
line in Bugzilla/Install/Util.pm, which is not supposed to be called at all during check setup. Changing if ($INC{'Bugzilla.pm'}) , to a different method of ensuring your in the requirements phase would also solve this issue.
Reporter | ||
Comment 5•13 years ago
|
||
Shouldn't that be
if (exists $INC{'Bugzilla.pm'}) {
?
Without the 'exists' it creates it in the process of seeing whether it's there or not.
Comment 6•13 years ago
|
||
hmm.. Thats definitely true if looking up a hash reference... not sure in this case. Although, it does not use exist in 3.6-4.2.
Assignee | ||
Updated•13 years ago
|
Target Milestone: Bugzilla 4.0 → Bugzilla 4.2
Assignee | ||
Updated•12 years ago
|
Flags: blocking4.4+
Reporter | ||
Comment 7•12 years ago
|
||
I can still reproduce this on trunk, but I get a different traceback now than I did back then.
Justdaves-MacBook-Pro:bugzilla dave$ rm extensions/Voting/disabled
Justdaves-MacBook-Pro:bugzilla dave$ ./checksetup.pl --check-modules
Can't locate Math/Random/ISAAC.pm in @INC (@INC contains: . lib /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12) at Bugzilla/RNG.pm line 16.
BEGIN failed--compilation aborted at Bugzilla/RNG.pm line 16.
Compilation failed in require at Bugzilla/Util.pm line 28.
BEGIN failed--compilation aborted at Bugzilla/Util.pm line 28.
Compilation failed in require at Bugzilla/FlagType.pm line 39.
BEGIN failed--compilation aborted at Bugzilla/FlagType.pm line 39.
Compilation failed in require at Bugzilla/Flag.pm line 44.
BEGIN failed--compilation aborted at Bugzilla/Flag.pm line 44.
Compilation failed in require at Bugzilla/Attachment.pm line 40.
BEGIN failed--compilation aborted at Bugzilla/Attachment.pm line 40.
Compilation failed in require at Bugzilla/Bug.pm line 13.
BEGIN failed--compilation aborted at Bugzilla/Bug.pm line 13.
Compilation failed in require at ./extensions/Voting/Extension.pm line 12.
BEGIN failed--compilation aborted at ./extensions/Voting/Extension.pm line 12.
Compilation failed in require at Bugzilla/Install/Util.pm line 175.
Reporter | ||
Comment 8•12 years ago
|
||
FYI I did try running it before enabling Voting, and it does work fine as long as Voting isn't enabled.
Assignee | ||
Comment 9•12 years ago
|
||
AFAICT, this mess is due to bug 530994 and bug 530767 (support CPAN modules as Bugzilla extensions), because extensions/Voting/Extension.pm is require()'ed, and as there is a missing dependency, it crashes:
sub extension_requirement_packages {
my ($file_sets, $extra_packages) = extension_code_files('requirements only');
foreach my $file_set (@$file_sets) {
my $file = shift @$file_set;
my $name = require $file; # The culprit!
Comment 4 and comment 5 have nothing to do with this bug. Bugzilla->extensions isn't called at that point.
Assignee | ||
Comment 10•12 years ago
|
||
Add the missing Config.pm file into Voting/. This is the single extension to lack this file.
Assignee: extensions → LpSolit
Status: NEW → ASSIGNED
Attachment #668940 -
Flags: review?(justdave)
Attachment #668940 -
Flags: review?(glob)
Assignee | ||
Comment 11•12 years ago
|
||
4.2 still uses the MPL 1.1 license.
Attachment #668941 -
Flags: review?(justdave)
Comment 12•12 years ago
|
||
Comment on attachment 668940 [details] [diff] [review]
patch, v1
you need to remove the NAME definition from Extension.pm:
Constant subroutine Bugzilla::Extension::Voting::NAME redefined
Attachment #668940 -
Flags: review?(justdave)
Attachment #668940 -
Flags: review?(glob)
Attachment #668940 -
Flags: review-
Assignee | ||
Comment 13•12 years ago
|
||
Ah thanks, I didn't notice the warning.
Attachment #668940 -
Attachment is obsolete: true
Attachment #668941 -
Attachment is obsolete: true
Attachment #668941 -
Flags: review?(justdave)
Attachment #669091 -
Flags: review?(glob)
Assignee | ||
Comment 14•12 years ago
|
||
Attachment #669092 -
Flags: review?(glob)
Comment 15•12 years ago
|
||
Comment on attachment 669091 [details] [diff] [review]
patch, v2
r=glob
Attachment #669091 -
Flags: review?(glob) → review+
Comment 16•12 years ago
|
||
Comment on attachment 669092 [details] [diff] [review]
patch for 4.2, v2
r=glob
although i'd prefer to see REQUIRED_MODULES and OPTIONAL_MODULES defined to match our sample config.pm.
Attachment #669092 -
Flags: review?(glob) → review+
Assignee | ||
Comment 17•12 years ago
|
||
(In reply to Byron Jones ‹:glob› from comment #16)
> although i'd prefer to see REQUIRED_MODULES and OPTIONAL_MODULES defined to
> match our sample config.pm.
I simply copied OldBugMove/Config.pm into Voting/ and didn't check that. I can add them if you want.
Flags: approval4.4+
Flags: approval4.2+
Flags: approval+
Assignee | ||
Comment 18•12 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
added extensions/Voting/Config.pm
modified extensions/Voting/Extension.pm
Committed revision 8416.
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
added extensions/Voting/Config.pm
modified extensions/Voting/Extension.pm
Committed revision 8410.
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
added extensions/Voting/Config.pm
modified extensions/Voting/Extension.pm
Committed revision 8146.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•