Update Archive-Extract to CPAN version 0.62
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 10 Jan 2013 08:13:46 +0000 (08:13 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 10 Jan 2013 08:13:46 +0000 (08:13 +0000)
  [DELTA]

  Changes for 0.62    Wed Jan  9 21:38:10 2013
  ============================================
  * OpenBSD's tar does not like some archives
    on CPAN, prefer gtar if it is available.
  * Correctly detect lack of /bin/tar (Smylers)

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

index b4f46ff..164f047 100755 (executable)
@@ -200,7 +200,7 @@ use File::Glob qw(:case);
 
     'Archive::Extract' => {
         'MAINTAINER'   => 'kane',
-        'DISTRIBUTION' => 'BINGOS/Archive-Extract-0.60.tar.gz',
+        'DISTRIBUTION' => 'BINGOS/Archive-Extract-0.62.tar.gz',
         'FILES'        => q[cpan/Archive-Extract],
         'UPSTREAM'     => 'cpan',
         'BUGS'         => 'bug-archive-extract@rt.cpan.org',
index 91436df..2607f8b 100644 (file)
@@ -16,6 +16,7 @@ use Locale::Maketext::Simple    Style => 'gettext';
 ### solaris has silly /bin/tar output ###
 use constant ON_SOLARIS     => $^O eq 'solaris' ? 1 : 0;
 use constant ON_NETBSD      => $^O eq 'netbsd' ? 1 : 0;
+use constant ON_OPENBSD     => $^O eq 'openbsd' ? 1 : 0;
 use constant ON_FREEBSD     => $^O eq 'freebsd' ? 1 : 0;
 use constant ON_LINUX       => $^O eq 'linux' ? 1 : 0;
 use constant FILE_EXISTS    => sub { -e $_[0] ? 1 : 0 };
@@ -46,7 +47,7 @@ use vars qw[$VERSION $PREFER_BIN $PROGRAMS $WARN $DEBUG
             $_ALLOW_BIN $_ALLOW_PURE_PERL $_ALLOW_TAR_ITER
          ];
 
-$VERSION            = '0.60';
+$VERSION            = '0.62';
 $PREFER_BIN         = 0;
 $WARN               = 1;
 $DEBUG              = 0;
@@ -140,6 +141,10 @@ CMD: for my $pgm (qw[tar unzip gzip bunzip2 uncompress unlzma unxz]) {
       ($PROGRAMS->{$pgm}) = grep { scalar run(command=> [ $_, $opt, '-1' ]) } can_run($pgm);
       next CMD;
     }
+    if ( $pgm eq 'tar' and ON_OPENBSD ) {
+      # try gtar first
+      next CMD if $PROGRAMS->{$pgm} = can_run('gtar');
+    }
     $PROGRAMS->{$pgm} = can_run($pgm);
 }
 
@@ -654,7 +659,7 @@ sub have_old_bunzip2 {
         ### check for /bin/tar ###
         ### check for /bin/gzip if we need it ###
         ### if any of the binaries are not available, return NA
-        {   my $diag =  not $self->bin_tar ?
+        {   my $diag =  !$self->bin_tar ?
                             loc("No '%1' program found", '/bin/tar') :
                         $self->is_tgz && !$self->bin_gzip ?
                             loc("No '%1' program found", '/bin/gzip') :
@@ -1662,7 +1667,7 @@ thread safe. See C<rt.cpan.org> bug C<#45671> for details.
 
 =head1 BUG REPORTS
 
-Please report bugs or other issues to E<lt>bug-archive-extract@rt.cpan.org<gt>.
+Please report bugs or other issues to E<lt>bug-archive-extract@rt.cpan.orgE<gt>.
 
 =head1 AUTHOR