diff options
author | Norbert Preining <preining@logic.at> | 2018-05-18 23:47:11 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2018-05-18 23:47:11 +0000 |
commit | 3a86322b73c7a5688f1eba0f5edebd42255ff294 (patch) | |
tree | 648dce872be64098e8f6537f6f825cef6367bdc4 | |
parent | 8a183473880d35d01df3cc03402814a03a0bc131 (diff) |
make compressor mode default to xz, but selectable via TEXLIVE_COMPRESSOR
git-svn-id: svn://tug.org/texlive/trunk@47762 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 51b1679effe..c514931693e 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -2136,12 +2136,21 @@ sub action_backup { if ($clean_mode) { clear_old_backups ($pkg, $opts{"backupdir"}, $opts{"clean"}, $opts{"dry-run"}, 1); } else { - my $compressorextension = $TeXLive::TLConfig::CompressorExtension{'lz4'}; + # for now default to xz and allow overriding with env var + my $compressor = "xz"; + if ($ENV{'TEXLIVE_COMPRESSOR'}) { + if (TeXLive::TLUtils::member($ENV{'TEXLIVE_COMPRESSOR'}, @TeXLive::TLConfig::AcceptedCompressors)) { + $compressor = $ENV{'TEXLIVE_COMPRESSOR'}; + } else { + tlwarn("$prog: unknown compressor in TEXLIVE_COMPRESSOR=$ENV{'TEXLIVE_COMPRESSOR'}, falling back to xz\n"); + } + } + my $compressorextension = $TeXLive::TLConfig::CompressorExtension{$compressor}; my $tlp = $localtlpdb->get_package($pkg); info("saving current status of $pkg to $opts{'backupdir'}/${pkg}.r" . $tlp->revision . ".tar.$compressorextension\n"); if (!$opts{"dry-run"}) { - $tlp->make_container("lz4", $localtlpdb->root, + $tlp->make_container($compressor, $localtlpdb->root, $opts{"backupdir"}, "${pkg}.r" . $tlp->revision); } } |