Closed Bug 280573 Opened 20 years ago Closed 20 years ago

checksetup fails in Bugzilla::Auth BEGIN block

Categories

(Bugzilla :: Installation & Upgrading, defect)

2.19.2
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: cso, Assigned: mkanat)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

After the checkin of bug 278792 I can not run checksetup.pl on Windows (can't
verify on Linux).

Prior to this checkin, it works as expected.

No value for param user_verify_class (try running checksetup.pl again) at
Bugzilla/Config.pm line 162.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 45.
Compilation failed in require at checksetup.pl line 1473.
BEGIN failed--compilation aborted at checksetup.pl line 1473.
That's weird. All parameters are supposed to be defined by the time I inserted
that module in checksetup. user_verify_class should already exist...

But apparently, if I delete the data/ directory and run checksetup, it doesn't work.

We can't re-open bug 278792 and back it out, because other code that depends on
it has already been checked-in.

So I'll have to look into this ASAP.
Severity: major → blocker
OS: Windows XP → All
Hardware: PC → All
Summary: No value for param user_verify_class error → No value for param user_verify_class error (params not all defaulted in checksetup.pl)
Keywords: regression
OK, so I just need to move bz_crypt to Bugzilla::Util instead of Bugzilla::Auth. :-(
Status: NEW → ASSIGNED
Actually, as justdave pointed out, we should only "require" in checksetup,
never "use."
Attachment #173026 - Flags: review?
Summary: No value for param user_verify_class error (params not all defaulted in checksetup.pl) → checksetup fails in Bugzilla::Auth BEGIN block
Comment on attachment 173026 [details] [diff] [review]
"require" instead of "use" Bugzilla::Auth

how are you getting bz_crypt into checksetup.pl's namespace?  I think you might
need an import here.  (require doesn't automatically import exported symbols
like use does)
Comment on attachment 173026 [details] [diff] [review]
"require" instead of "use" Bugzilla::Auth

> # It's safe to use Bugzilla::Auth here because parameters have now been
> # defined.
>-use Bugzilla::Auth;
>+require Bugzilla::Auth;

nit:  i don't think the comment is valid anymore.

r=glob with the comment removed.
Attachment #173026 - Flags: review? → review+
Flags: approval?
(In reply to comment #5)
> (From update of attachment 173026 [details] [diff] [review] [edit])
> r=glob with the comment removed.

Does it actually work?  (See comment 4)
ok, as discussed on IRC, we should just remove that section altogether for now.
 It's already getting pulled in via globals.pl, which is why it actually works
without the import.  It either needs to have the import added so as not to
confuse people later, or just remove it altogether.  I'd vote for removing it at
this point.  We can put it back when globals.pl actually goes away.
make sure you do the tweak per comment 7 before checking in.  You can post a
revision here if you want, preapproved pending review as long as that's all you
do to it.
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 2.20
OK, here I do require *and* import.
Attachment #173026 - Attachment is obsolete: true
  Oh, also:

(In reply to comment #5)
> nit:  i don't think the comment is valid anymore.

  The comment is still very valid -- it's not safe to "require" Bugzilla::Auth
before parameters are defined. Perhaps the comment should say "require" instead
of "use", but I don't think that's too important.
Also, for whoever does checkin:

<mkanat> justdave: By the way, I submitted a new patch that does both "require"
and "import."
<mkanat> justdave: I'd rather leave it in there, so it's clearer what's going on
for the person (maybe not me, who knows) who removes globals.pl.
<justdave> that was on the list of acceptible things to do with the patch :)
Given all the comments on this patch and how this has to be changed or left or 
modified on checkin... I'd rather just have a new patch please.
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.334; previous revision: 1.333
done
Status: ASSIGNED → RESOLVED
Closed: 20 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: