summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLConfig.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2018-06-11 06:39:10 +0000
committerNorbert Preining <preining@logic.at>2018-06-11 06:39:10 +0000
commit68de942a3e3ab2d927389d502695e37a898d6ad0 (patch)
treea46b44d6241165a37fa2a916affc445f5cae7f27 /Master/tlpkg/TeXLive/TLConfig.pm
parentb5e7ffa4544901e5b21e9d195fac8ad6516c4aac (diff)
code cleanup and streamlining (use %Compressors)
git-svn-id: svn://tug.org/texlive/trunk@47985 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLConfig.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLConfig.pm42
1 files changed, 25 insertions, 17 deletions
diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm
index 495a316b0c0..1522a08b0b8 100644
--- a/Master/tlpkg/TeXLive/TLConfig.pm
+++ b/Master/tlpkg/TeXLive/TLConfig.pm
@@ -27,14 +27,8 @@ BEGIN {
%FallbackDownloaderProgram
%FallbackDownloaderArgs
$DefaultCompressorFormat
- $DefaultContainerExtension
- @AcceptedCompressors
- $AcceptedCompressorsRegexp
- %CompressorProgram
- %DecompressorProgram
- %CompressorArgs
- %DecompressorArgs
- %CompressorExtension
+ $CompressorExtRegexp
+ %Compressors
$InfraLocation
$DatabaseName
$PackageBackupDir
@@ -129,15 +123,29 @@ our %FallbackDownloaderArgs = (
);
# the way we package things on the web
our $DefaultCompressorFormat = "xz";
-our $DefaultContainerExtension = "tar.$DefaultCompressorFormat";
-# mind that the order here is important as gives also the preference!
-our @AcceptedCompressors = qw/lz4 gzip xz/;
-our $AcceptedCompressorsRegexp = "(xz|lz4|gzip)";
-our %CompressorProgram = ( 'xz' => 'xz', 'gzip' => 'gzip', 'lz4' => 'lz4');
-our %CompressorExtension = ( 'xz' => 'xz', 'gzip' => 'gz', 'lz4' => 'lz4');
-our %CompressorArgs = ( 'xz' => ['-zf'], 'gzip' => [ '-f' ], 'lz4' => ['-zfm', '--rm', '-q']);
-our %DecompressorProgram = ( 'xz' => 'xz', 'gzip' => 'gzip', 'lz4' => 'lz4');
-our %DecompressorArgs = ( 'xz' => ['-dcf'], 'gzip' => ['-dcf'], 'lz4' => ['-dcf']);
+# priority defines which compressor is selected for backups/rollback containers
+# less is better
+our %Compressors = (
+ "lz4" => {
+ "decompress_args" => ["-dcf"],
+ "compress_args" => ["-zfmq", "--rm"],
+ "extension" => "lz4",
+ "priority" => 10,
+ },
+ "gzip" => {
+ "decompress_args" => ["-dcf"],
+ "compress_args" => ["-f"],
+ "extension" => "gz",
+ "priority" => 20,
+ },
+ "xz" => {
+ "decompress_args" => ["-dcf"],
+ "compress_args" => ["-zf"],
+ "extension" => "xz",
+ "priority" => 30,
+ },
+);
+our $CompressorExtRegexp = "(" . join("|", map { $Compressors{$_}{'extension'} } keys(%Compressors)) . ")";
# archive (not user) settings.
# these can be overridden by putting them into 00texlive.config.tlpsrc