summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm17
1 files changed, 10 insertions, 7 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 6d02404fb48..fc05caa5c70 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1960,23 +1960,26 @@ sub w32_remove_from_path {
=item C<check_file($what, $checksum, $checksize>
Remove C<$what> if either the given C<$checksum> or C<$checksize> does
-not agree. Does nothing if neither of the check arguments is given.
+not agree. If a check argument is not given, that check is not performed.
=cut
sub check_file {
- my ($xzfile, $checksum, $size) = @_;
+ my ($xzfile, $checksum, $checksize) = @_;
if ($checksum) {
- if (tlchecksum($xzfile) ne $checksum) {
- tlwarn("TLUtils::check_file: found $xzfile, but hashsums differ, removing it.\n");
+ my $tlchecksum = tlchecksum($xzfile);
+ if ($tlchecksum ne $checksum) {
+ tlwarn("TLUtils::check_file: removing $xzfile, checksums differ:\n");
+ tlwarn("TLUtils::check_file: TL=$tlchecksum, arg=$checksum\n");
unlink($xzfile);
return;
}
}
- if ($size) {
+ if ($checksize) {
my $filesize = (stat $xzfile)[7];
- if ($filesize != $size) {
- tlwarn("TLUtils::check_file: found $xzfile, but sizes differ, removing it.\n");
+ if ($filesize != $checksize) {
+ tlwarn("TLUtils::check_file: removing $xzfile, sizes differ:\n");
+ tlwarn("TLUtils::check_file: TL=$filesize, arg=$checksize\n");
unlink($xzfile);
return;
}