summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm19
1 files changed, 11 insertions, 8 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 4a5aebbb304..b92f5cc28e1 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2134,9 +2134,12 @@ sub unpack {
}
my $type;
- for my $ext (@AcceptedCompressors) {
+ my $compressorextension;
+ for my $comptype (@AcceptedCompressors) {
+ my $ext = $CompressorExtension{$comptype};
if ($what =~ m/\.tar\.$ext$/) {
- $type = $ext;
+ $type = $comptype;
+ $compressorextension = $ext;
}
}
if (!$type) {
@@ -2148,7 +2151,7 @@ sub unpack {
# my $wget = $::progs{'wget'};
# only check the necessary compressor program
my $decompressor = TeXLive::TLUtils::quotify_path_with_spaces($::progs{$DecompressorProgram{$type}});
- my $decompressorArgs = $::progs{$DecompressorArgs{$type}};
+ my @decompressorArgs = @{$DecompressorArgs{$type}};
if (!defined($decompressor)) {
return (0, "programs not set up properly");
}
@@ -2156,12 +2159,11 @@ sub unpack {
my $fn = basename($what);
my $pkg = $fn;
- # TODO use %CompressorExtensions here!!!
- $pkg =~ s/\.tar\.$AcceptedCompressorsRegexp$//;
- my $tarfile;
+ $pkg =~ s/\.tar\.$compressorextension$//;
my $remove_containerfile = $remove;
my $containerfile = "$tempdir/$fn";
- $tarfile = "$tempdir/$fn"; $tarfile =~ s/$AcceptedCompressorsRegexp$//;
+ my $tarfile = "$tempdir/$fn";
+ $tarfile =~ s/\.$compressorextension$//;
my $containerfile_quote;
my $tarfile_quote;
my $target_quote;
@@ -2204,7 +2206,8 @@ sub unpack {
$remove_containerfile = 1;
}
debug("decompressing $containerfile to $tarfile\n");
- system("$decompressor $decompressorArgs < $containerfile_quote > $tarfile_quote");
+ debug("calling $decompressor @decompressorArgs < $containerfile_quote > $tarfile_quote\n");
+ system("$decompressor @decompressorArgs < $containerfile_quote > $tarfile_quote");
if (! -f $tarfile) {
unlink($tarfile, $containerfile);
return(0, "Decompressing $containerfile failed");