summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-05-26 16:05:46 +0000
committerKarl Berry <karl@freefriends.org>2018-05-26 16:05:46 +0000
commit8b0a2c2440b86f7a080298a61ba649fe95b719fe (patch)
treecc3fc7d65a89d4aa36e5b026fb59262c2c1e6d82 /Master/tlpkg/TeXLive/TLUtils.pm
parentffc8bb403efdf5b822b9f1e49ff4a5940b0ca5c5 (diff)
avoid some extra-long lines.
git-svn-id: svn://tug.org/texlive/trunk@47847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm63
1 files changed, 37 insertions, 26 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 633fa8630da..38573e0371f 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2075,7 +2075,8 @@ sub check_file {
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 @@ sub unpack {
}
# 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 @@ sub setup_programs {
$::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,18 +2356,20 @@ sub setup_programs {
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;
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 @@ sub setup_programs {
# 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 @@ sub setup_unix_one {
} 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");