texlive[47220] Master: silence checksum/size warnings of unpack
commits+preining at tug.org
commits+preining at tug.org
Sun Apr 1 05:20:33 CEST 2018
Revision: 47220
http://tug.org/svn/texlive?view=revision&revision=47220
Author: preining
Date: 2018-04-01 05:20:33 +0200 (Sun, 01 Apr 2018)
Log Message:
-----------
silence checksum/size warnings of unpack during restore/unwind
Modified Paths:
--------------
trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
trunk/Master/tlpkg/TeXLive/TLUtils.pm
Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl 2018-04-01 02:57:00 UTC (rev 47219)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl 2018-04-01 03:20:33 UTC (rev 47220)
@@ -1799,7 +1799,8 @@
return ($F_ERROR);
}
$localtlpdb->remove_package($pkg);
- TeXLive::TLPDB->_install_data($restore_file , 0, [] ,$localtlpdb);
+ # the -1 force the TLUtils::unpack to NOT warn about missing checksum/sizes
+ TeXLive::TLPDB->_install_data($restore_file , 0, [], $localtlpdb, "-1", "-1");
logpackage("restore: $pkg ($rev)");
# now we have to read the .tlpobj file and add it to the DB
my $tlpobj = TeXLive::TLPOBJ->new;
@@ -3269,8 +3270,9 @@
$unwind_package = $newname;
}
+ # the -1 force the TLUtils::unpack to NOT warn about missing checksum/sizes
my ($instret, $msg) = TeXLive::TLUtils::unpack("$unwind_package",
- $localtlpdb->root);
+ $localtlpdb->root, checksum => "-1", checksize => "-1");
if ($instret) {
# now we have to include the tlpobj
my $tlpobj = TeXLive::TLPOBJ->new;
Modified: trunk/Master/tlpkg/TeXLive/TLUtils.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLUtils.pm 2018-04-01 02:57:00 UTC (rev 47219)
+++ trunk/Master/tlpkg/TeXLive/TLUtils.pm 2018-04-01 03:20:33 UTC (rev 47220)
@@ -2077,7 +2077,7 @@
return;
}
# only run checksum tests if we can actually compute the checksum
- if ($checksum && $::checksum_method) {
+ if ($checksum && ($checksum ne "-1") && $::checksum_method) {
my $tlchecksum = TeXLive::TLCrypto::tlchecksum($xzfile);
if ($tlchecksum ne $checksum) {
tlwarn("TLUtils::check_file: removing $xzfile, checksums differ:\n");
@@ -2090,7 +2090,7 @@
return;
}
}
- if ($checksize) {
+ if ($checksize && ($checksize ne "-1")) {
my $filesize = (stat $xzfile)[7];
if ($filesize != $checksize) {
tlwarn("TLUtils::check_file: removing $xzfile, sizes differ:\n");
@@ -2116,6 +2116,9 @@
Returns a pair of values: in case of error return 0 and an additional
explanation, in case of success return 1 and the name of the package.
+If C<checksum> or C<size> is C<-1>, no warnings about missing checksum/size
+is printed. This is used during restore and unwinding of failed updates.
+
=cut
sub unpack {
More information about the tex-live-commits
mailing list