David Coppit wrote: > On Sun, 14 Jan 2007, Joey Hess wrote: > > >I tried out 1.5000. I'm still seeing apparently the same hang with it > >while building Mail::MboxParser.. > > Hi Tassilo, > > It looks like changes to my module Mail::Mbox::MessageParser are causing > your module Mail::MboxParser to hang during "make test". I debugged the > issue, and it appears to be a problem with the way that you change the > file position while testing the newline type in the file, as well as > another unnecessary seek in next_message_new(). > > Attached is a patch that fixes the problem(s).
Based on this, I'm reopening this bug and reassigning it to Mail::MboxParser. Note that the Mail::Mbox::MessageParser in debian does not currently trigger this hang, but until the hang is fixed, I can't upgrade to the new version of the package, so please apply the patch. (If it doesn't get applied eventually, I might have to package the new upstream version anyway, at which point this bug would become release critical again..) > --- MboxParser.pm 2005-12-08 05:15:39.000000000 -0500 > +++ /Users/coppit/Desktop/MboxParser.pm 2007-04-23 13:54:45.000000000 > -0400 > @@ -519,7 +519,6 @@ > > return undef if ref(\$p) eq 'SCALAR' or $p->end_of_file; > > - seek $self->{READER}, $self->{CURR_POS}, SEEK_SET; > my $nl = $self->{NL}; > my $mailref = $p->read_next_email; > my ($header, $body) = split /$nl$nl/, $$mailref, 2; > @@ -794,6 +793,7 @@ > my $h = $self->{READER}; > my $newline; > > + my $old_position = tell $h; > seek $h, 0, SEEK_SET; > while (sysread $h, (my $c), 1) { > if (ord($c) == 13) { > @@ -807,6 +807,7 @@ > last; > } > } > + seek($h, $old_position, 0); > return $newline; > } > -- see shy jo
signature.asc
Description: Digital signature