This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Archive-Extract to CPAN version 0.58
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sat, 22 Oct 2011 20:22:59 +0000 (21:22 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sat, 22 Oct 2011 21:09:44 +0000 (22:09 +0100)
  [DELTA]

  Changes for 0.58    Sat Oct 22 20:25:00 2011
  ============================================
  * Apply patch from Craig A. Berry [rt#71846]
    make _untar_bin use Unix-syntax archive names
    on VMS

Porting/Maintainers.pl
cpan/Archive-Extract/lib/Archive/Extract.pm
pod/perldelta.pod

index 8ad20eb..4f97e2a 100755 (executable)
@@ -200,7 +200,7 @@ use File::Glob qw(:case);
     'Archive::Extract' =>
        {
        'MAINTAINER'    => 'kane',
-       'DISTRIBUTION'  => 'BINGOS/Archive-Extract-0.56.tar.gz',
+       'DISTRIBUTION'  => 'BINGOS/Archive-Extract-0.58.tar.gz',
        'FILES'         => q[cpan/Archive-Extract],
        'UPSTREAM'      => 'cpan',
        'BUGS'          => 'bug-archive-extract@rt.cpan.org',
index 4ca925d..4a0727f 100644 (file)
@@ -45,7 +45,7 @@ use vars qw[$VERSION $PREFER_BIN $PROGRAMS $WARN $DEBUG
             $_ALLOW_BIN $_ALLOW_PURE_PERL $_ALLOW_TAR_ITER
          ];
 
-$VERSION            = '0.56';
+$VERSION            = '0.58';
 $PREFER_BIN         = 0;
 $WARN               = 1;
 $DEBUG              = 0;
@@ -670,17 +670,21 @@ sub have_old_bunzip2 {
         ### see what command we should run, based on whether
         ### it's a .tgz or .tar
 
+        ### GNU tar can't handled VMS filespecs, but VMSTAR can handle Unix filespecs.
+        my $archive = $self->archive;
+        $archive = VMS::Filespec::unixify($archive) if ON_VMS;
+
         ### XXX solaris tar and bsdtar are having different outputs
         ### depending whether you run with -x or -t
         ### compensate for this insanity by running -t first, then -x
         {    my $cmd =
-                $self->is_tgz ? [$self->bin_gzip, '-cdf', $self->archive, '|',
+                $self->is_tgz ? [$self->bin_gzip, '-cdf', $archive, '|',
                                  $self->bin_tar, '-tf', '-'] :
-                $self->is_tbz ? [$self->bin_bunzip2, '-cd', $self->archive, '|',
+                $self->is_tbz ? [$self->bin_bunzip2, '-cd', $archive, '|',
                                  $self->bin_tar, '-tf', '-'] :
-                $self->is_txz ? [$self->bin_unxz, '-cd', $self->archive, '|',
+                $self->is_txz ? [$self->bin_unxz, '-cd', $archive, '|',
                                  $self->bin_tar, '-tf', '-'] :
-                [$self->bin_tar, @ExtraTarFlags, '-tf', $self->archive];
+                [$self->bin_tar, @ExtraTarFlags, '-tf', $archive];
 
             ### run the command
             ### newer versions of 'tar' (1.21 and up) now print record size
@@ -697,12 +701,12 @@ sub have_old_bunzip2 {
             unless( $out[0] ) {
                 return $self->_error(loc(
                                 "Error listing contents of archive '%1': %2",
-                                $self->archive, $buffer ));
+                                $archive, $buffer ));
             }
 
             ### no buffers available?
             if( !IPC::Cmd->can_capture_buffer and !$buffer ) {
-                $self->_error( $self->_no_buffer_files( $self->archive ) );
+                $self->_error( $self->_no_buffer_files( $archive ) );
 
             } else {
                 ### if we're on solaris we /might/ be using /bin/tar, which has
@@ -729,13 +733,13 @@ sub have_old_bunzip2 {
 
         ### now actually extract it ###
         {   my $cmd =
-                $self->is_tgz ? [$self->bin_gzip, '-cdf', $self->archive, '|',
+                $self->is_tgz ? [$self->bin_gzip, '-cdf', $archive, '|',
                                  $self->bin_tar, '-xf', '-'] :
-                $self->is_tbz ? [$self->bin_bunzip2, '-cd', $self->archive, '|',
+                $self->is_tbz ? [$self->bin_bunzip2, '-cd', $archive, '|',
                                  $self->bin_tar, '-xf', '-'] :
-                $self->is_txz ? [$self->bin_unxz, '-cd', $self->archive, '|',
+                $self->is_txz ? [$self->bin_unxz, '-cd', $archive, '|',
                                  $self->bin_tar, '-xf', '-'] :
-                [$self->bin_tar, @ExtraTarFlags, '-xf', $self->archive];
+                [$self->bin_tar, @ExtraTarFlags, '-xf', $archive];
 
             my $buffer = '';
             unless( scalar run( command => $cmd,
@@ -743,7 +747,7 @@ sub have_old_bunzip2 {
                                 verbose => $DEBUG )
             ) {
                 return $self->_error(loc("Error extracting archive '%1': %2",
-                                $self->archive, $buffer ));
+                                $archive, $buffer ));
             }
 
             ### we might not have them, due to lack of buffers
index d368716..28d6fd4 100644 (file)
@@ -96,6 +96,10 @@ XXX
 
 =item *
 
+L<Archive::Extract> has been upgraded from version 0.56 to version 0.58.
+
+=item *
+
 L<HTTP::Tiny> has been upgraded from version 0.013 to version 0.014.
 
 Adds additional shorthand methods for all common HTTP verbs,