clone 419689 -1 -2 reassign -1 libxml-sax-perl 0.14-0.1 retitle -1 libxml-sax-perl: processing instruction parsing bug breaks XML::Filter::Sort block 419689 by -1 submitter -1 ! tags -1 patch upstream forwarded -1 http://rt.cpan.org/Public/Bug/Display.html?id=19173 reassign -2 libxml-sax-perl 0.14-0.1 retitle -2 libxml-sax-perl: warnings from encoding detection severity -2 minor tags -2 patch fixed-upstream submitter -2 ! thanks
On Tue, Apr 17, 2007 at 02:42:22PM +0200, Lucas Nussbaum wrote: > Package: libxml-filter-sort-perl > Version: 1.01-1 > Severity: serious > Justification: FTBFS on i386, very likely to fail everywhere else > Usertags: grid5000 rebuild > During a rebuild of all packages in sid, I discovered that your package > failed to build on i386. > > Relevant parts: > DIED. FAILED tests 7, 13 > Failed 2/26 tests, 92.31% okay > Failed Test Stat Wstat Total Fail Failed List of Failed > ------------------------------------------------------------------------------- > t/1_buffer.t 1 256 17 1 5.88% 14 > t/4_workout.t 2 512 26 2 7.69% 7 13 > t/6_diskworkout.t 2 512 26 2 7.69% 7 13 > Failed 3/7 test scripts, 57.14% okay. 5/117 subtests failed, 95.73% okay. > make[1]: *** [test_dynamic] Error 2 This is due to a bug in XML::SAX::PurePerl 0.14. It's reported as CPAN #19173. I'm attaching the patch from the CPAN report, which fixes the problem for me. The problem is still present in upstream 0.15. The libxml-filter-sort-perl test log also shows these warnings: Unable to recognise encoding of this document at /usr/share/perl5/XML/SAX/PurePerl/EncodingDetect.pm line 96. These are apparently harmless and are fixed in upstream 0.15. I'm attaching a patch for this as well for the sake of completeness. Lucas, thanks for your QA efforts. Much appreciated. Cheers, -- Niko Tyni [EMAIL PROTECTED]
--- SAX/PurePerl.pm 2006-04-24 01:20:09.000000000 +0200 +++ SAX/PurePerl.pm.tom 2006-05-09 23:55:42.000000000 +0200 @@ -624,28 +624,31 @@ my ($target, $data); $target = $self->Name($reader) || $self->parser_error("PI has no target", $reader); + if ($self->skip_whitespace($reader)) { - $target = ''; + my $tdata = ''; while (1) { my $data = $reader->data; $self->parser_error("End of data seen while looking for close PI marker", $reader) unless length($data); if ($data =~ /^(.*?)\?>/s) { - $target .= $1; + $tdata .= $1; $reader->move_along(length($1) + 2); last; } else { - $target .= $data; + $tdata .= $data; $reader->move_along(length($data)); } } + $data = $tdata; } else { my $data = $reader->data(2); $data =~ /^\?>/ or $self->parser_error("PI closing sequence not found", $reader); $reader->move_along(2); } + $self->processing_instruction({ Target => $target, Data => $data }); return 1;
--- libxml-sax-perl-0.14/SAX/PurePerl/EncodingDetect.pm 2003-09-29 23:20:41.000000000 +0300 +++ XML-SAX-0.15/SAX/PurePerl/EncodingDetect.pm 2007-02-07 11:33:50.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: EncodingDetect.pm,v 1.5 2003/09/29 20:20:41 matt Exp $ +# $Id: EncodingDetect.pm,v 1.6 2007/02/07 09:33:50 grant Exp $ package XML::SAX::PurePerl; # NB, not ::EncodingDetect! @@ -88,6 +88,10 @@ # $reader->set_encoding('UTF-8'); return; } + elsif ($data =~ /^[\x20\x09\x0A\x0D]+\x3C[^\x3F]/) { + # $reader->set_encoding('UTF-8'); + return; + } elsif ($data =~ /^\x4C\x6F\xA7\x94/) { $reader->set_encoding('EBCDIC'); return;