From 8134d388d7c592f1dccd78e671b01ae8c5f77d9a Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Thu, 10 Jan 2013 08:13:46 +0000 Subject: [PATCH] Update Archive-Extract to CPAN version 0.62 [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 | 2 +- cpan/Archive-Extract/lib/Archive/Extract.pm | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index b4f46ff..164f047 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -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', diff --git a/cpan/Archive-Extract/lib/Archive/Extract.pm b/cpan/Archive-Extract/lib/Archive/Extract.pm index 91436df..2607f8b 100644 --- a/cpan/Archive-Extract/lib/Archive/Extract.pm +++ b/cpan/Archive-Extract/lib/Archive/Extract.pm @@ -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 bug C<#45671> for details. =head1 BUG REPORTS -Please report bugs or other issues to Ebug-archive-extract@rt.cpan.org. +Please report bugs or other issues to Ebug-archive-extract@rt.cpan.orgE. =head1 AUTHOR -- 2.7.4