summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2018-01-24 03:55:35 +0000
committerNorbert Preining <preining@logic.at>2018-01-24 03:55:35 +0000
commit9eaa775cf46f42eee783f48b085b765d08cf3296 (patch)
tree05411d5843f285dcd5416d3872e39cfced4c9b7d /Master/tlpkg/TeXLive/TLUtils.pm
parenta2e0081ad0b36cecf31817297ce96467110d71d0 (diff)
better debugging and stronger integrity checks
git-svn-id: svn://tug.org/texlive/trunk@46421 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 2a6c940ac89..5fa568e01be 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2064,6 +2064,11 @@ not agree. If a check argument is not given, that check is not performed.
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");
+ return;
+ }
# only run checksum tests if we can actually compute the checksum
if ($checksum && $::checksum_method) {
my $tlchecksum = TeXLive::TLCrypto::tlchecksum($xzfile);
@@ -2072,6 +2077,10 @@ sub check_file {
tlwarn("TLUtils::check_file: TL=$tlchecksum, arg=$checksum\n");
unlink($xzfile);
return;
+ } else {
+ debug("TLUtils::check_file: checksums for $xzfile agree\n");
+ # if we have checked the checksum, we don't need to check the size, too
+ return;
}
}
if ($checksize) {