summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
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) {