Hello community, here is the log from the commit of package perl-IO-Compress-Base checked in at Thu Jul 5 01:26:07 CEST 2007. -------- --- perl-IO-Compress-Base/perl-IO-Compress-Base.changes 2007-03-07 11:22:20.000000000 +0100 +++ /mounts/work_src_done/STABLE/perl-IO-Compress-Base/perl-IO-Compress-Base.changes 2007-07-03 08:45:38.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Jul 3 08:32:49 CEST 2007 - anicka@suse.cz + +- update to 2.005 + * fix problems when using IO::Uncompress::Gunzip with XML::Parser. + +------------------------------------------------------------------- Old: ---- IO-Compress-Base-2.004.tar.bz2 New: ---- IO-Compress-Base-2.005.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-IO-Compress-Base.spec ++++++ --- /var/tmp/diff_new_pack.P28212/_old 2007-07-05 01:23:37.000000000 +0200 +++ /var/tmp/diff_new_pack.P28212/_new 2007-07-05 01:23:37.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package perl-IO-Compress-Base (Version 2.004) +# spec file for package perl-IO-Compress-Base (Version 2.005) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -17,7 +17,7 @@ Requires: perl = %{perl_version} Autoreqprov: on Summary: Base Class for IO::Compress modules -Version: 2.004 +Version: 2.005 Release: 1 Source: IO-Compress-Base-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -65,6 +65,9 @@ /var/adm/perl-modules/perl-IO-Compress-Base %changelog +* Tue Jul 03 2007 - anicka@suse.cz +- update to 2.005 + * fix problems when using IO::Uncompress::Gunzip with XML::Parser. * Wed Mar 07 2007 - anicka@suse.cz - update to 2.004 * Made seek less wasteful of memory. ++++++ IO-Compress-Base-2.004.tar.bz2 -> IO-Compress-Base-2.005.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/Changes new/IO-Compress-Base-2.005/Changes --- old/IO-Compress-Base-2.004/Changes 2007-03-03 16:17:47.000000000 +0100 +++ new/IO-Compress-Base-2.005/Changes 2007-06-18 22:40:07.000000000 +0200 @@ -1,6 +1,20 @@ CHANGES ------- + 2.005 18 June 2007 + + * Stephen Turner reported a problem when using IO::Uncompress::Gunzip + with XML::Parser. Turns out there were two issues. + + Firstly an IO::Uncompress object isn't an IO::Handle. It is now. + + Secondly the implementation of "read" wasn't honouring this + + SCALAR will be grown or shrunk to the length actually read. + + In particular it didn't do the right thing on EOF. + This has been fixed. + 2.004 3 March 2007 * Made seek less wasteful of memory. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/lib/IO/Compress/Base/Common.pm new/IO-Compress-Base-2.005/lib/IO/Compress/Base/Common.pm --- old/IO-Compress-Base-2.004/lib/IO/Compress/Base/Common.pm 2007-03-03 16:20:15.000000000 +0100 +++ new/IO-Compress-Base-2.005/lib/IO/Compress/Base/Common.pm 2007-06-18 22:06:33.000000000 +0200 @@ -11,7 +11,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $HAS_ENCODE); @ISA = qw(Exporter); -$VERSION = '2.004'; +$VERSION = '2.005'; @EXPORT = qw( isaFilehandle isaFilename whatIsInput whatIsOutput isaFileGlobString cleanFileGlobString oneTarget diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/lib/IO/Compress/Base.pm new/IO-Compress-Base-2.005/lib/IO/Compress/Base.pm --- old/IO-Compress-Base-2.004/lib/IO/Compress/Base.pm 2007-03-03 16:20:08.000000000 +0100 +++ new/IO-Compress-Base-2.005/lib/IO/Compress/Base.pm 2007-06-18 23:01:34.000000000 +0200 @@ -6,7 +6,7 @@ use strict ; use warnings; -use IO::Compress::Base::Common 2.004 ; +use IO::Compress::Base::Common 2.005 ; use IO::File ; use Scalar::Util qw(blessed readonly); @@ -18,9 +18,9 @@ use bytes; our (@ISA, $VERSION); -#@ISA = qw(Exporter IO::File); +@ISA = qw(Exporter IO::File); -$VERSION = '2.004'; +$VERSION = '2.005'; #Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at .../ext/Compress-Zlib/Gzip/blib/lib/Compress/Zlib/Common.pm line 16. @@ -574,6 +574,9 @@ $buffer = \$_[0] ; } + $] >= 5.008 and ( utf8::downgrade($$buffer, 1) + or croak "Wide character in " . *$self->{ClassName} . "::write:"); + if (@_ > 1) { my $slen = defined $$buffer ? length($$buffer) : 0; @@ -985,3 +988,4 @@ modify it under the same terms as Perl itself. + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/lib/IO/Uncompress/AnyUncompress.pm new/IO-Compress-Base-2.005/lib/IO/Uncompress/AnyUncompress.pm --- old/IO-Compress-Base-2.004/lib/IO/Uncompress/AnyUncompress.pm 2007-03-03 16:20:13.000000000 +0100 +++ new/IO-Compress-Base-2.005/lib/IO/Uncompress/AnyUncompress.pm 2007-06-18 22:06:31.000000000 +0200 @@ -4,16 +4,16 @@ use warnings; use bytes; -use IO::Compress::Base::Common 2.004 qw(createSelfTiedObject); +use IO::Compress::Base::Common 2.005 qw(createSelfTiedObject); -use IO::Uncompress::Base 2.004 ; +use IO::Uncompress::Base 2.005 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError); -$VERSION = '2.004'; +$VERSION = '2.005'; $AnyUncompressError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -27,18 +27,18 @@ BEGIN { - eval ' use IO::Uncompress::Adapter::Inflate 2.004 ;'; - eval ' use IO::Uncompress::Adapter::Bunzip2 2.004 ;'; - eval ' use IO::Uncompress::Adapter::LZO 2.004 ;'; - eval ' use IO::Uncompress::Adapter::Lzf 2.004 ;'; - - eval ' use IO::Uncompress::Bunzip2 2.004 ;'; - eval ' use IO::Uncompress::UnLzop 2.004 ;'; - eval ' use IO::Uncompress::Gunzip 2.004 ;'; - eval ' use IO::Uncompress::Inflate 2.004 ;'; - eval ' use IO::Uncompress::RawInflate 2.004 ;'; - eval ' use IO::Uncompress::Unzip 2.004 ;'; - eval ' use IO::Uncompress::UnLzf 2.004 ;'; + eval ' use IO::Uncompress::Adapter::Inflate 2.005 ;'; + eval ' use IO::Uncompress::Adapter::Bunzip2 2.005 ;'; + eval ' use IO::Uncompress::Adapter::LZO 2.005 ;'; + eval ' use IO::Uncompress::Adapter::Lzf 2.005 ;'; + + eval ' use IO::Uncompress::Bunzip2 2.005 ;'; + eval ' use IO::Uncompress::UnLzop 2.005 ;'; + eval ' use IO::Uncompress::Gunzip 2.005 ;'; + eval ' use IO::Uncompress::Inflate 2.005 ;'; + eval ' use IO::Uncompress::RawInflate 2.005 ;'; + eval ' use IO::Uncompress::Unzip 2.005 ;'; + eval ' use IO::Uncompress::UnLzf 2.005 ;'; } sub new @@ -56,7 +56,7 @@ sub getExtraParams { - use IO::Compress::Base::Common 2.004 qw(:Parse); + use IO::Compress::Base::Common 2.005 qw(:Parse); return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ) ; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/lib/IO/Uncompress/Base.pm new/IO-Compress-Base-2.005/lib/IO/Uncompress/Base.pm --- old/IO-Compress-Base-2.004/lib/IO/Uncompress/Base.pm 2007-03-03 16:20:08.000000000 +0100 +++ new/IO-Compress-Base-2.005/lib/IO/Uncompress/Base.pm 2007-06-18 22:06:26.000000000 +0200 @@ -6,16 +6,15 @@ use bytes; our (@ISA, $VERSION, @EXPORT_OK, %EXPORT_TAGS); -#@ISA = qw(Exporter IO::File); -@ISA = qw(Exporter ); +@ISA = qw(Exporter IO::File); -$VERSION = '2.004'; +$VERSION = '2.005'; use constant G_EOF => 0 ; use constant G_ERR => -1 ; -use IO::Compress::Base::Common 2.004 ; +use IO::Compress::Base::Common 2.005 ; #use Parse::Parameters ; use IO::File ; @@ -974,14 +973,9 @@ my $self = shift ; return G_EOF if *$self->{Closed} ; - return G_EOF if !length *$self->{Pending} && *$self->{EndStream} ; my $buffer ; - #$self->croakError(*$self->{ClassName} . - # "::read: buffer parameter is read-only") - # if Compress::Raw::Zlib::_readonly_ref($_[0]); - if (ref $_[0] ) { $self->croakError(*$self->{ClassName} . "::read: buffer parameter is read-only") if readonly(${ $_[0] }); @@ -1000,6 +994,22 @@ my $length = $_[1] ; my $offset = $_[2] || 0; + if (! *$self->{AppendOutput}) { + if (! $offset) { + $$buffer = '' ; + } + else { + if ($offset > length($$buffer)) { + $$buffer .= "\x00" x ($offset - length($$buffer)); + } + else { + substr($$buffer, $offset) = ''; + } + } + } + + return G_EOF if !length *$self->{Pending} && *$self->{EndStream} ; + # the core read will return 0 if asked for 0 bytes return 0 if defined $length && $length == 0 ; @@ -1008,8 +1018,6 @@ $self->croakError(*$self->{ClassName} . "::read: length parameter is negative") if $length < 0 ; - $$buffer = '' unless *$self->{AppendOutput} || $offset ; - # Short-circuit if this is a simple read, with no length # or offset specified. unless ( $length || $offset) { @@ -1031,6 +1039,7 @@ # or both are specified. my $out_buffer = *$self->{Pending} ; + while (! *$self->{EndStream} && length($out_buffer) < $length) { my $buf_len = $self->_raw_read(\$out_buffer); @@ -1044,21 +1053,18 @@ return 0 if $length == 0 ; + $$buffer = '' + if ! defined $$buffer; + + $offset = length $$buffer + if *$self->{AppendOutput} ; + *$self->{Pending} = $out_buffer; $out_buffer = \*$self->{Pending} ; - if ($offset) { - $$buffer .= "\x00" x ($offset - length($$buffer)) - if $offset > length($$buffer) ; - #substr($$buffer, $offset) = substr($$out_buffer, 0, $length, '') ; - substr($$buffer, $offset) = substr($$out_buffer, 0, $length) ; - substr($$out_buffer, 0, $length) = '' ; - } - else { - #$$buffer .= substr($$out_buffer, 0, $length, '') ; - $$buffer .= substr($$out_buffer, 0, $length) ; - substr($$out_buffer, 0, $length) = '' ; - } + #substr($$buffer, $offset) = substr($$out_buffer, 0, $length, '') ; + substr($$buffer, $offset) = substr($$out_buffer, 0, $length) ; + substr($$out_buffer, 0, $length) = '' ; return $length ; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/META.yml new/IO-Compress-Base-2.005/META.yml --- old/IO-Compress-Base-2.004/META.yml 2007-03-03 16:35:15.000000000 +0100 +++ new/IO-Compress-Base-2.005/META.yml 2007-06-30 16:39:58.000000000 +0200 @@ -1,9 +1,9 @@ --- #YAML:1.0 name: IO-Compress-Base -version: 2.004 +version: 2.005 abstract: Base Class for IO::Compress modules license: perl -generated_by: ExtUtils::MakeMaker version 6.31 +generated_by: ExtUtils::MakeMaker version 6.33 distribution_type: module requires: Scalar::Util: 0 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/README new/IO-Compress-Base-2.005/README --- old/IO-Compress-Base-2.004/README 2007-03-03 16:20:07.000000000 +0100 +++ new/IO-Compress-Base-2.005/README 2007-06-18 22:35:11.000000000 +0200 @@ -1,9 +1,9 @@ IO::Compress::Base - Version 2.004 + Version 2.005 - 3rd March 2007 + 18th June 2007 Copyright (c) 2005-2007 Paul Marquess. All rights reserved. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/t/compress/generic.pl new/IO-Compress-Base-2.005/t/compress/generic.pl --- old/IO-Compress-Base-2.004/t/compress/generic.pl 2007-02-19 12:59:33.000000000 +0100 +++ new/IO-Compress-Base-2.005/t/compress/generic.pl 2007-05-29 17:32:48.000000000 +0200 @@ -18,7 +18,7 @@ $extra = 1 if $st ; - plan(tests => 641 + $extra) ; + plan(tests => 670 + $extra) ; } sub myGZreadFile @@ -781,7 +781,9 @@ eval { $io->read(1) } ; like $@, mkErr("buffer parameter is read-only"); + $buf = "abcd"; is $io->read($buf, 0), 0, "Requested 0 bytes" ; + is $buf, "", "Buffer empty"; is $io->read($buf, 3), 3 ; is $buf, "Thi"; @@ -791,6 +793,30 @@ or print "# [$buf]\n" ;; ok ! $io->eof; + $buf = "ab" ; + is $io->read($buf, 3, 4), 3 ; + is $buf, "ab" . "\x00" x 2 . "s a" + or print "# [$buf]\n" ;; + ok ! $io->eof; + + # read the rest of the file + $buf = ''; + my $remain = length($str) - 9; + is $io->read($buf, $remain+1), $remain ; + is $buf, substr($str, 9); + ok $io->eof; + + $buf = "hello"; + is $io->read($buf, 10), 0 ; + is $buf, "", "Buffer empty"; + ok $io->eof; + + ok $io->close(); + $buf = "hello"; + is $io->read($buf, 10), 0 ; + is $buf, "hello", "Buffer not empty"; + ok $io->eof; + # $io->seek(-4, 2); # # ok ! $io->eof; @@ -930,11 +956,15 @@ } - # Test read + # Test Read { my $io = $UncompressClass->new($name); + $buf = "abcd"; + is $io->read($buf, 0), 0, "Requested 0 bytes" ; + is $buf, "", "Buffer empty"; + ok $io->read($buf, 3) == 3 ; ok $buf eq "Thi"; @@ -942,6 +972,30 @@ ok $buf eq "Ths i"; ok ! $io->eof; + $buf = "ab" ; + is $io->read($buf, 3, 4), 3 ; + is $buf, "ab" . "\x00" x 2 . "s a" + or print "# [$buf]\n" ;; + ok ! $io->eof; + + # read the rest of the file + $buf = ''; + my $remain = length($str) - 9; + is $io->read($buf, $remain), $remain ; + is $buf, substr($str, 9); + ok $io->eof; + + $buf = "hello"; + is $io->read($buf, 10), 0 ; + is $buf, "", "Buffer empty"; + ok $io->eof; + + ok $io->close(); + $buf = "hello"; + is $io->read($buf, 10), 0 ; + is $buf, "hello", "Buffer not empty"; + ok $io->eof; + # $io->seek(-4, 2); # # ok ! $io->eof; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/t/compress/oneshot.pl new/IO-Compress-Base-2.005/t/compress/oneshot.pl --- old/IO-Compress-Base-2.004/t/compress/oneshot.pl 2007-02-19 12:59:34.000000000 +0100 +++ new/IO-Compress-Base-2.005/t/compress/oneshot.pl 2007-05-29 17:32:49.000000000 +0200 @@ -51,7 +51,7 @@ like $@, mkErr("^$TopType: unknown key value\\(s\\) Fred"), ' Illegal Parameters'; eval { $a = $Func->() ;} ; - like $@, mkErr("^$TopType: expected at least 1 parameters"), ' No Parameters'; + like $@, "/^$TopType: expected at least 1 parameters/", ' No Parameters'; eval { $a = $Func->(\$x, \1) ;} ; like $$Error, "/^$TopType: output buffer is read-only/", ' Output is read-only' ; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Compress-Base-2.004/t/compress/tied.pl new/IO-Compress-Base-2.005/t/compress/tied.pl --- old/IO-Compress-Base-2.004/t/compress/tied.pl 2007-02-19 12:59:34.000000000 +0100 +++ new/IO-Compress-Base-2.005/t/compress/tied.pl 2007-05-29 17:32:49.000000000 +0200 @@ -199,10 +199,10 @@ { my $io = new $UncompressClass $name ; - ok ! $io->eof; - is $io->tell(), 0 ; + ok ! $io->eof, " Not EOF"; + is $io->tell(), 0, " Tell is 0" ; my @lines = <$io>; - is @lines, 6 + is @lines, 6, " Line is 6" or print "# Got " . scalar(@lines) . " lines, expected 6\n" ; is $lines[1], "of a paragraph\n" ; is join('', @lines), $str ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org