diff options
Diffstat (limited to 'Build/source/texk/tests/TeXLive/TLConfig.pm')
-rw-r--r-- | Build/source/texk/tests/TeXLive/TLConfig.pm | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/Build/source/texk/tests/TeXLive/TLConfig.pm b/Build/source/texk/tests/TeXLive/TLConfig.pm index afafeea13c3..3efef6a5c96 100644 --- a/Build/source/texk/tests/TeXLive/TLConfig.pm +++ b/Build/source/texk/tests/TeXLive/TLConfig.pm @@ -1,4 +1,4 @@ -# $Id: TLConfig.pm 47938 2018-06-06 01:35:10Z preining $ +# $Id: TLConfig.pm 48093 2018-06-26 21:03:56Z preining $ # TeXLive::TLConfig.pm - module exporting configuration values # Copyright 2007-2018 Norbert Preining # This file is licensed under the GNU General Public License version 2 @@ -6,7 +6,7 @@ package TeXLive::TLConfig; -my $svnrev = '$Revision: 47938 $'; +my $svnrev = '$Revision: 48093 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -27,14 +27,8 @@ BEGIN { %FallbackDownloaderProgram %FallbackDownloaderArgs $DefaultCompressorFormat - $DefaultContainerExtension - @AcceptedCompressors - $AcceptedCompressorsRegexp - %CompressorProgram - %DecompressorProgram - %CompressorArgs - %DecompressorArgs - %CompressorExtension + $CompressorExtRegexp + %Compressors $InfraLocation $DatabaseName $PackageBackupDir @@ -122,22 +116,36 @@ our $DefaultFallbackDownloader = "wget"; our @AcceptedFallbackDownloaders = qw/curl wget/; our %FallbackDownloaderProgram = ( 'wget' => 'wget', 'curl' => 'curl'); our %FallbackDownloaderArgs = ( - 'curl' => ['--user-agent', 'texlive/curl', '--retry', '10', + 'curl' => ['--user-agent', 'texlive/curl', '--retry', '10', '--fail', '--location', '--connect-timeout', "$NetworkTimeout", '--silent', '--output'], 'wget' => ['--user-agent=texlive/wget', '--tries=10', "--timeout=$NetworkTimeout", '-q', '-O'], ); # 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 |