In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/827ada3b9f33112fba4175a347285a95b464cba8?hp=ca68faa29a4cfa4703dd3a9e78586e2e2b417680>
- Log ----------------------------------------------------------------- commit 827ada3b9f33112fba4175a347285a95b464cba8 Author: Chris 'BinGOs' Williams <[email protected]> Date: Mon Jun 28 22:17:18 2010 +0100 Added Archive-Tar update to perl5133delta M pod/perl5133delta.pod commit d33cd7cf556efc86b3dfb79f2291738fb626ab6f Author: Chris 'BinGOs' Williams <[email protected]> Date: Mon Jun 28 22:06:53 2010 +0100 Update Archive-Tar to CPAN version 1.62 [DELTA] Important changes since 1.54 include: compatibility with busybox implementations of tar which was added by Mark Swayne; a fix so that write() and create_archive() close only handles they opened by Darrell K.; and a bug was fixed regarding the exit code of extract_archive which was spotted by and upstreamed from RedHat by Martin Cermak. M Porting/Maintainers.pl M cpan/Archive-Tar/lib/Archive/Tar.pm M cpan/Archive-Tar/lib/Archive/Tar/Constant.pm M cpan/Archive-Tar/lib/Archive/Tar/File.pm ----------------------------------------------------------------------- Summary of changes: Porting/Maintainers.pl | 2 +- cpan/Archive-Tar/lib/Archive/Tar.pm | 31 +++++++++++++++++-------- cpan/Archive-Tar/lib/Archive/Tar/Constant.pm | 2 +- cpan/Archive-Tar/lib/Archive/Tar/File.pm | 2 +- pod/perl5133delta.pod | 11 +++++++++ 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 1a90159..ca5c22f 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -192,7 +192,7 @@ use File::Glob qw(:case); 'Archive::Tar' => { 'MAINTAINER' => 'kane', - 'DISTRIBUTION' => 'BINGOS/Archive-Tar-1.54.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Archive-Tar-1.62.tar.gz', 'FILES' => q[cpan/Archive-Tar], 'UPSTREAM' => 'cpan', 'BUGS' => '[email protected]', diff --git a/cpan/Archive-Tar/lib/Archive/Tar.pm b/cpan/Archive-Tar/lib/Archive/Tar.pm index 006edbd..b5ad00b 100644 --- a/cpan/Archive-Tar/lib/Archive/Tar.pm +++ b/cpan/Archive-Tar/lib/Archive/Tar.pm @@ -23,7 +23,7 @@ require Exporter; use strict; use vars qw[$DEBUG $error $VERSION $WARN $FOLLOW_SYMLINK $CHOWN $CHMOD $DO_NOT_USE_PREFIX $HAS_PERLIO $HAS_IO_STRING $SAME_PERMISSIONS - $INSECURE_EXTRACT_MODE @ISA @EXPORT + $INSECURE_EXTRACT_MODE $ZERO_PAD_NUMBERS @ISA @EXPORT ]; @ISA = qw[Exporter]; @@ -31,12 +31,13 @@ use vars qw[$DEBUG $error $VERSION $WARN $FOLLOW_SYMLINK $CHOWN $CHMOD $DEBUG = 0; $WARN = 1; $FOLLOW_SYMLINK = 0; -$VERSION = "1.54"; +$VERSION = "1.62"; $CHOWN = 1; $CHMOD = 1; $SAME_PERMISSIONS = $> == 0 ? 1 : 0; $DO_NOT_USE_PREFIX = 0; $INSECURE_EXTRACT_MODE = 0; +$ZERO_PAD_NUMBERS = 0; BEGIN { use Config; @@ -317,6 +318,7 @@ sub _read_tar { while( $handle->read( $chunk, HEAD ) ) { ### IO::Zlib doesn't support this yet my $offset = eval { tell $handle } || 'unknown'; + $@ = ''; unless( $read++ ) { my $gzip = GZIP_MAGIC_NUM; @@ -369,7 +371,7 @@ sub _read_tar { } ### ignore labels: - ### http://www.gnu.org/manual/tar/html_node/tar_139.html + ### http://www.gnu.org/software/tar/manual/html_chapter/Media.html#SEC159 next if $entry->is_label; if( length $entry->type and ($entry->is_file || $entry->is_longlink) ) { @@ -453,10 +455,11 @@ sub _read_tar { next LOOP; } - $self->_extract_file( $entry ) if $extract - && !$entry->is_longlink - && !$entry->is_unknown - && !$entry->is_label; + if ( $extract && !$entry->is_longlink + && !$entry->is_unknown + && !$entry->is_label ) { + $self->_extract_file( $entry ) or return; + } ### Guard against tarfiles with garbage at the end last LOOP if $entry->name eq ''; @@ -1242,8 +1245,8 @@ sub write { : $HAS_PERLIO ? $dummy : do { seek $handle, 0, 0; local $/; <$handle> }; - ### make sure to close the handle; - close $handle; + ### make sure to close the handle if we created it + close $handle unless ref($file); return $rv; } @@ -1273,7 +1276,7 @@ sub _format_tar_entry { my $l = PREFIX_LENGTH; # is ambiguous otherwise... substr ($prefix, 0, -$l) = "" if length $prefix >= PREFIX_LENGTH; - my $f1 = "%06o"; my $f2 = "%11o"; + my $f1 = "%06o"; my $f2 = $ZERO_PAD_NUMBERS ? "%011o" : "%11o"; ### this might be optimizable with a 'changed' flag in the file objects ### my $tar = pack ( @@ -1296,6 +1299,7 @@ sub _format_tar_entry { ); ### add the checksum ### + my $checksum_fmt = $ZERO_PAD_NUMBERS ? "%06o\0" : "%06o\0"; substr($tar,148,7) = sprintf("%6o\0", unpack("%16C*",$tar)); return $tar; @@ -1874,6 +1878,13 @@ your perl to be able to write stringified archives. Don't change this variable unless you B<really> know what you're doing. +=head2 $Archive::Tar::ZERO_PAD_NUMBERS + +This variable holds a boolean indicating if we will create +zero padded numbers for C<size>, C<mtime> and C<checksum>. +The default is C<0>, indicating that we will create space padded +numbers. Added for compatibility with C<busybox> implementations. + =head1 FAQ =over 4 diff --git a/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm b/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm index aef1d62..57ec567 100644 --- a/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm +++ b/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm @@ -3,7 +3,7 @@ package Archive::Tar::Constant; BEGIN { require Exporter; - $VERSION = '0.02'; + $VERSION = '1.62'; @ISA = qw[Exporter]; require Time::Local if $^O eq "MacOS"; diff --git a/cpan/Archive-Tar/lib/Archive/Tar/File.pm b/cpan/Archive-Tar/lib/Archive/Tar/File.pm index 0815bb6..251a5c6 100644 --- a/cpan/Archive-Tar/lib/Archive/Tar/File.pm +++ b/cpan/Archive-Tar/lib/Archive/Tar/File.pm @@ -13,7 +13,7 @@ use Archive::Tar::Constant; use vars q...@isa $VERSION]; #...@isa = qw[Archive::Tar]; -$VERSION = '0.02'; +$VERSION = '1.62'; ### set value to 1 to oct() it during the unpack ### my $tmpl = [ diff --git a/pod/perl5133delta.pod b/pod/perl5133delta.pod index 93f4b9b..1cf19d8 100644 --- a/pod/perl5133delta.pod +++ b/pod/perl5133delta.pod @@ -115,6 +115,17 @@ modification for the lzma logic to favour IO::Uncompress::Unlzma =item * +Archive-Tar updated to CPAN version 1.62 (d33cd7c) + +Important changes since 1.54 include: compatibility with busybox +implementations of tar which was added by Mark Swayne; a fix so +that write() and create_archive() close only handles +they opened by Darrell K.; and a bug was fixed regarding the exit code +of extract_archive which was spotted by and upstreamed from RedHat by +Martin Cermak. + +=item * + Attribute-Handlers updated to CPAN version 0.88 (f2ea78b) =item * -- Perl5 Master Repository
