Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Email::MIME->as_string gives SCALAR for body with mismatched Email:: modules

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Email Notifications
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: gerv, Assigned: gerv)

Tracking

unspecified
Bugzilla 3.0
Bug Flags:
approval +
approval3.2 +
approval3.0 +

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Assignee)

Description

9 years ago
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

9 years ago
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?
(Assignee)

Comment 2

9 years ago
Not sure. How do I tell?

Gerv

Comment 3

9 years ago
Hmm. Maybe:

perl -Iinc -MEmail::Simple -MEmail::MIME -e 'print Email::Simple->VERSION . " " . Email::MIME->VERSION'
(Assignee)

Comment 4

9 years ago
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

9 years ago
(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?
(Assignee)

Comment 6

9 years ago
That's what it was. I've checked with the maintainer of the modules; patch coming up to require compatible versions.

Gerv
(Assignee)

Comment 7

9 years ago
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
Assignee: email-notifications → gerv
Status: NEW → ASSIGNED
Attachment #326701 - Flags: review?(mkanat)

Comment 8

9 years ago
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.
Attachment #326701 - Flags: review?(mkanat) → review-
(Assignee)

Comment 9

9 years ago
Created attachment 326703 [details] [diff] [review]
Patch v.2

OK.

Gerv
Attachment #326701 - Attachment is obsolete: true
Attachment #326703 - Flags: review?(mkanat)

Comment 10

9 years ago
Comment on attachment 326703 [details] [diff] [review]
Patch v.2

Looks Good To Me (TM)!
Attachment #326703 - Flags: review?(mkanat) → review+

Updated

9 years ago
Flags: approval3.2+
Flags: approval3.0+
Flags: approval+
Target Milestone: --- → Bugzilla 3.0

Updated

9 years ago
Summary: Latest Email::Simple or Email::MIME module is broken: as_string gives SCALAR for body → Email::MIME->as_string gives SCALAR for body with mismatched Email:: modules
(Assignee)

Comment 11

9 years ago
Created attachment 326706 [details] [diff] [review]
Patch for 3.0, v.1

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

Gerv
Attachment #326706 - Flags: review?(mkanat)

Comment 12

9 years ago
Comment on attachment 326706 [details] [diff] [review]
Patch for 3.0, v.1

Lookz gewd.
Attachment #326706 - Flags: review?(mkanat) → review+
(Assignee)

Comment 13

9 years ago
Created attachment 326709 [details] [diff] [review]
Patch for 3.2, v.1
Attachment #326709 - Flags: review?(mkanat)

Comment 14

9 years ago
Comment on attachment 326709 [details] [diff] [review]
Patch for 3.2, v.1

This is the same as tip, no?
Attachment #326709 - Flags: review?(mkanat) → review+
(Assignee)

Comment 15

9 years ago
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
(Assignee)

Comment 16

9 years ago
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
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.