diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-21 00:15:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-21 00:15:27 +0000 |
commit | a4c42bfb2337d37da89d789cb8cc226367994e32 (patch) | |
tree | c3eabdef5d565a4e515d2be0d9d4d0540bde0250 /Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm | |
parent | 8274475057f024d35332ac47c2e2f23ea156e6ed (diff) |
perl 5.14.2 from siep
git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm b/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm index 63451e7450d..972df6ca06f 100644 --- a/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm +++ b/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm @@ -253,14 +253,21 @@ sub untar { if (0) { # makes changing order easier } elsif ($BUGHUNTING) { $prefer=2; - } elsif ($exttar && $extgzip && $file =~ /\.(?:bz2|tbz)$/i) { - # until Archive::Tar handles bzip2 + } elsif ($CPAN::Config->{prefer_external_tar}) { $prefer = 1; } elsif ( $CPAN::META->has_usable("Archive::Tar") && $CPAN::META->has_inst("Compress::Zlib") ) { - $prefer = 2; + my $prefer_external_tar = $CPAN::Config->{prefer_external_tar}; + unless (defined $prefer_external_tar) { + if ($^O =~ /(MSWin32|solaris)/) { + $prefer_external_tar = 0; + } else { + $prefer_external_tar = 1; + } + } + $prefer = $prefer_external_tar ? 1 : 2; } elsif ($exttar && $extgzip) { # no modules and not bz2 $prefer = 1; |