texlive[47847] Master/tlpkg/TeXLive/TLUtils.pm: avoid some extra-long
commits+karl at tug.org
commits+karl at tug.org
Sat May 26 18:05:46 CEST 2018
Revision: 47847
http://tug.org/svn/texlive?view=revision&revision=47847
Author: karl
Date: 2018-05-26 18:05:46 +0200 (Sat, 26 May 2018)
Log Message:
-----------
avoid some extra-long lines.
Modified Paths:
--------------
trunk/Master/tlpkg/TeXLive/TLUtils.pm
Modified: trunk/Master/tlpkg/TeXLive/TLUtils.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLUtils.pm 2018-05-26 15:58:41 UTC (rev 47846)
+++ trunk/Master/tlpkg/TeXLive/TLUtils.pm 2018-05-26 16:05:46 UTC (rev 47847)
@@ -2075,7 +2075,8 @@
my ($xzfile, $checksum, $checksize) = @_;
debug("check_file $xzfile, $checksum, $checksize\n");
if (!$checksum && !$checksize) {
- tlwarn("TLUtils::check_file: neither checksum nor checksize available for $xzfile, cannot check integrity!\n");
+ tlwarn("TLUtils::check_file: neither checksum nor checksize " .
+ "available for $xzfile, cannot check integrity");
return;
}
# only run checksum tests if we can actually compute the checksum
@@ -2153,7 +2154,8 @@
}
# only check the necessary compressor program
- my $decompressor = TeXLive::TLUtils::quotify_path_with_spaces($::progs{$DecompressorProgram{$type}});
+ my $decompressor = TeXLive::TLUtils::quotify_path_with_spaces(
+ $::progs{$DecompressorProgram{$type}});
my @decompressorArgs = @{$DecompressorArgs{$type}};
if (!defined($decompressor)) {
return (0, "programs not set up properly");
@@ -2340,10 +2342,9 @@
$::progs{'tar'} = "tar";
if (!defined($platform) || ($platform eq "")) {
- # we assume that we run from uncompressed media, so we can call platform() and
- # thus also the config.guess script
- # but we have to setup $::installerdir because the platform script
- # relies on it
+ # we assume that we run from uncompressed media, so we can call
+ # platform() and thus also the config.guess script but we have to
+ # setup $::installerdir because the platform script relies on it
$::installerdir = "$bindir/../..";
$platform = platform();
}
@@ -2355,7 +2356,8 @@
my $defprog = $FallbackDownloaderProgram{$dltype};
# do not warn on errors
push @working_downloaders, $dltype if
- setup_one(($isWin ? "w32" : "unix"), $defprog, "$bindir/$dltype/$defprog.$platform", "--version", 1);
+ setup_one(($isWin ? "w32" : "unix"), $defprog,
+ "$bindir/$dltype/$defprog.$platform", "--version", 1);
}
$::progs{'working_downloaders'} = [ @working_downloaders ];
my @working_compressors;
@@ -2362,11 +2364,12 @@
for my $comptype (@AcceptedCompressors) {
my $defprog = $CompressorProgram{$comptype};
# do not warn on errors
- if (setup_one(($isWin ? "w32" : "unix"), $defprog, "$bindir/$comptype/$defprog.$platform", "--version", 1)) {
+ if (setup_one(($isWin ? "w32" : "unix"), $defprog,
+ "$bindir/$comptype/$defprog.$platform", "--version", 1)) {
push @working_compressors, $comptype;
# also set up $::{'compressor'} if not already done
- # this selects the first one
- # but we might reset this depending on TEXLIVE_COMPRESSOR setting, see below
+ # this selects the first one, but we might reset this depending on
+ # TEXLIVE_COMPRESSOR setting, see below
defined($::progs{'compressor'}) || ($::progs{'compressor'} = $comptype);
}
}
@@ -2374,25 +2377,33 @@
# check whether selected downloader/compressor is working
# for downloader we allow 'lwp' as setting, too
- if ($ENV{'TEXLIVE_DOWNLOADER'} && $ENV{'TEXLIVE_DOWNLOADER'} ne 'lwp' &&
- !TeXLive::TLUtils::member($ENV{'TEXLIVE_DOWNLOADER'}, @{$::progs{'working_downloaders'}})) {
- tlwarn("Selected download program TEXLIVE_DOWNLOADER=$ENV{'TEXLIVE_DOWNLOADER'} is not working!\n");
- tlwarn("Please choose a different downloader or don't set TEXLIVE_DOWNLOADER at all.\n");
- tlwarn("Detected working downloaders @{$::progs{'working_downloaders'}}\n");
+ if ($ENV{'TEXLIVE_DOWNLOADER'}
+ && $ENV{'TEXLIVE_DOWNLOADER'} ne 'lwp'
+ && !TeXLive::TLUtils::member($ENV{'TEXLIVE_DOWNLOADER'},
+ @{$::progs{'working_downloaders'}})) {
+ tlwarn(<<END_DOWNLOADER_BAD);
+Selected download program TEXLIVE_DOWNLOADER=$ENV{'TEXLIVE_DOWNLOADER'}
+is not working!
+Please choose a different downloader or don't set TEXLIVE_DOWNLOADER.
+Detected working downloaders: @{$::progs{'working_downloaders'}}.
+END_DOWNLOADER_BAD
$ok = 0;
}
- if ($ENV{'TEXLIVE_COMPRESSOR'} &&
- !TeXLive::TLUtils::member($ENV{'TEXLIVE_COMPRESSOR'}, @{$::progs{'working_compressors'}})) {
- tlwarn("Selected download program TEXLIVE_COMPRESSOR=$ENV{'TEXLIVE_COMPRESSOR'} is not working!\n");
- tlwarn("Please choose a different compressor or don't set TEXLIVE_COMPRESSOR at all.\n");
- tlwarn("Detected working compressors: @{$::progs{'working_compressors'}}\n");
+ if ($ENV{'TEXLIVE_COMPRESSOR'}
+ && !TeXLive::TLUtils::member($ENV{'TEXLIVE_COMPRESSOR'},
+ @{$::progs{'working_compressors'}})) {
+ tlwarn(<<END_COMPRESSOR_BAD);
+Selected compression program TEXLIVE_COMPRESSOR=$ENV{'TEXLIVE_COMPRESSOR'}
+is not working!
+Please choose a different compressor or don't set TEXLIVE_COMPRESSOR.
+Detected working compressors: @{$::progs{'working_compressors'}}.
+END_COMPRESSOR_BAD
$ok = 0;
}
- #
- # setup default compressor $::progs{'compressor'} which is used in tlmgr in the
- # calls to make_container. By default we have already chosen the first that is
- # actually working from our list of @AcceptableCompressors, but let the user
- # override this.
+ # setup default compressor $::progs{'compressor'} which is used in
+ # tlmgr in the calls to make_container. By default we have already
+ # chosen the first that is actually working from our list of
+ # @AcceptableCompressors, but let the user override this.
if ($ENV{'TEXLIVE_COMPRESSOR'}) {
$::progs{'compressor'} = $ENV{'TEXLIVE_COMPRESSOR'};
}
@@ -2520,7 +2531,7 @@
} else {
# even the copied prog is not executable, strange
$test_fallback = 1;
- ddebug("Copied $p $::progs{$p} has x bit but not executable, strange!\n");
+ ddebug("Copied $p $::progs{$p} has x bit but not executable?!\n");
}
} else {
debug("Using copied $::progs{$p} for $p (not tested).\n");
More information about the tex-live-commits
mailing list