Last Comment Bug 441541 - Email::MIME->as_string gives SCALAR for body with mismatched Email:: modules
: Email::MIME->as_string gives SCALAR for body with mismatched Email:: modules
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Email Notifications (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Bugzilla 3.0
Assigned To: Gervase Markham [:gerv]
: default-qa
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-24 07:50 PDT by Gervase Markham [:gerv]
Modified: 2008-06-25 08:57 PDT (History)
1 user (show)
mkanat: approval+
mkanat: approval3.2+
mkanat: approval3.0+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch v.1 (1.10 KB, patch)
2008-06-25 08:32 PDT, Gervase Markham [:gerv]
mkanat: review-
Details | Diff | Splinter Review
Patch v.2 (718 bytes, patch)
2008-06-25 08:37 PDT, Gervase Markham [:gerv]
mkanat: review+
Details | Diff | Splinter Review
Patch for 3.0, v.1 (976 bytes, patch)
2008-06-25 08:47 PDT, Gervase Markham [:gerv]
mkanat: review+
Details | Diff | Splinter Review
Patch for 3.2, v.1 (718 bytes, patch)
2008-06-25 08:53 PDT, Gervase Markham [:gerv]
mkanat: review+
Details | Diff | Splinter Review

Description Gervase Markham [:gerv] 2008-06-24 07:50:27 PDT
The "Test" email output uses $email->as_string. This produces the headers correctly, but then produces SCALAR(0xXXXXXXX) for the body. Excerpt from test file output:

...
X-Bugzilla-Changed-Fields: Platform
In-Reply-To: <bug-1-423@http.localhost/bugzilla/>
References: <bug-1-423@http.localhost/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
Date: Tue, 24 Jun 2008 15:42:42 +0100

SCALAR(0x9471a74)


This problem occurs with Email::MIME 1.861 and Email::Simple 2.003, installed using "sudo /usr/bin/perl install-module.pl Email::MIME", which puts it in $BUGZILLA_HOME/lib. If I rm -rf all that stuff, and go back to the system modules (Email::MIME 1.855 and Email::Simple 1.995), bugmail works fine - but checksetup.pl doesn't pass, because it requires 1.861.

Gerv
Comment 1 Max Kanat-Alexander 2008-06-25 07:12:03 PDT
That sounds like an old Email:: bug where you have a newer version of one of the modules but an older version of another. Are you sure that things are getting used properly?
Comment 2 Gervase Markham [:gerv] 2008-06-25 07:21:16 PDT
Not sure. How do I tell?

Gerv
Comment 3 Max Kanat-Alexander 2008-06-25 07:24:27 PDT
Hmm. Maybe:

perl -Iinc -MEmail::Simple -MEmail::MIME -e 'print Email::Simple->VERSION . " " . Email::MIME->VERSION'
Comment 4 Gervase Markham [:gerv] 2008-06-25 07:57:23 PDT
With a working system, but checksetup.pl complaining:

gerv@otter:bugzilla$ perl -Iinc -MEmail::Simple -MEmail::MIME -e 'print Email::Simple->VERSION . " " . Email::MIME->VERSION . "\n"'
1.995 1.855
gerv@otter:bugzilla$

Then I run "sudo /usr/bin/perl install-module.pl Email::MIME", as checksetup.pl tells me. In the middle, I get this message, which may be relevant:

### ACHTUNG!  You need to update Email::MIME to a later version, as versions
### before 1.857 meddled in the guts of Email::Simple, which have been changed.
### If you are using an automated installer, this should happen automatically.
###
### This installation will proceed in five seconds.

The installation succeeds. Then:

gerv@otter:bugzilla$ perl -Iinc -MEmail::Simple -MEmail::MIME -e 'print Email::Simple->VERSION . " " . Email::MIME->VERSION . "\n"'
1.995 1.855
gerv@otter:bugzilla$ 

However, checksetup.pl now runs to completion, claiming Email::MIME of 1.861. (It doesn't have an entry for Email::Simple.)

checksetup.pl has /usr/bin/perl at the top; "which perl" says /usr/bin/perl too. 

If I change -Iinc to -Ilib (which is the name of the directory that install-module.pl puts things in) instead I get:

gerv@otter:bugzilla$ perl -Ilib -MEmail::Simple -MEmail::MIME -e 'print Email::Simple->VERSION . " " . Email::MIME->VERSION . "\n"'
2.003 1.861
gerv@otter:bugzilla$

This makes more sense, as checksetup.pl does "use lib qw(. lib);"

But all sets seem to match each other, so I'm not sure how I'm getting a mismatch.

Gerv
Comment 5 Max Kanat-Alexander 2008-06-25 08:01:30 PDT
(In reply to comment #4)
> But all sets seem to match each other, so I'm not sure how I'm getting a
> mismatch.

  Might be a mismatch with Email::MIME::Modifier?
Comment 6 Gervase Markham [:gerv] 2008-06-25 08:26:07 PDT
That's what it was. I've checked with the maintainer of the modules; patch coming up to require compatible versions.

Gerv
Comment 7 Gervase Markham [:gerv] 2008-06-25 08:32:14 PDT
Created attachment 326701 [details] [diff] [review]
Patch v.1

(16:21:28) gerv: What are the minimum versions of those three modules we need to specify, to make sure that any combination of versions above those numbers works together?
(16:22:26) rjbs: I suggest trying Email::Simple 2.003, Email::MIME 1.861, Email::MIME::Modifier 1.442
(16:24:41) gerv: Those are the very latest versions of everything, right?
(16:24:46) gerv: There's no way we can be more flexible?
(16:25:44) rjbs: There's a new Email::Simple as of this morning, so no.
(16:25:50) rjbs: but mostly, yes, the latest of everything
(16:25:56) rjbs: which means about a year old
(16:26:17) rjbs: The releases stopped then because that's when things were clearly working together.

Gerv
Comment 8 Max Kanat-Alexander 2008-06-25 08:35:03 PDT
Comment on attachment 326701 [details] [diff] [review]
Patch v.1

Actually, looks like Email::MIME currently pulls in that version of Email::Simple, so we don't need to check for it directly. so we just need the Modifier change.
Comment 9 Gervase Markham [:gerv] 2008-06-25 08:37:31 PDT
Created attachment 326703 [details] [diff] [review]
Patch v.2

OK.

Gerv
Comment 10 Max Kanat-Alexander 2008-06-25 08:38:03 PDT
Comment on attachment 326703 [details] [diff] [review]
Patch v.2

Looks Good To Me (TM)!
Comment 11 Gervase Markham [:gerv] 2008-06-25 08:47:03 PDT
Created attachment 326706 [details] [diff] [review]
Patch for 3.0, v.1

3.0 didn't have a stanza for Email::MIME.

Gerv
Comment 12 Max Kanat-Alexander 2008-06-25 08:48:24 PDT
Comment on attachment 326706 [details] [diff] [review]
Patch for 3.0, v.1

Lookz gewd.
Comment 13 Gervase Markham [:gerv] 2008-06-25 08:53:16 PDT
Created attachment 326709 [details] [diff] [review]
Patch for 3.2, v.1
Comment 14 Max Kanat-Alexander 2008-06-25 08:54:01 PDT
Comment on attachment 326709 [details] [diff] [review]
Patch for 3.2, v.1

This is the same as tip, no?
Comment 15 Gervase Markham [:gerv] 2008-06-25 08:56:25 PDT
Trunk:
Checking in Bugzilla/Install/Requirements.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Requirements.pm,v  <--  Requirements.pm
new revision: 1.48; previous revision: 1.47
done

3.0:
Checking in Bugzilla/Install/Requirements.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Requirements.pm,v  <--  Requirements.pm
new revision: 1.29.2.6; previous revision: 1.29.2.5
done

Gerv
Comment 16 Gervase Markham [:gerv] 2008-06-25 08:57:56 PDT
Looks like it, doesn't it? :-)

Checking in Bugzilla/Install/Requirements.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Requirements.pm,v  <--  Requirements.pm
new revision: 1.47.2.1; previous revision: 1.47
done

Gerv

Note You need to log in before you can comment on or make changes to this bug.