diff options
author | Norbert Preining <preining@logic.at> | 2018-04-01 03:20:33 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2018-04-01 03:20:33 +0000 |
commit | da14a49978ae2f64cc77995664f47d77976b18b8 (patch) | |
tree | eaacee981950b744591e0e6247af11eefd705228 /Master | |
parent | 387bc346cef7111884a4918bfa3cbf8859d191cb (diff) |
silence checksum/size warnings of unpack during restore/unwind
git-svn-id: svn://tug.org/texlive/trunk@47220 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 6 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index f0f725b97a6..e234b16e827 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -1799,7 +1799,8 @@ sub restore_one_package { 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 @@ sub action_update { $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; diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index c989cd63dee..ff3960faf99 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -2077,7 +2077,7 @@ sub check_file { 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 @@ sub check_file { 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 @@ C<remove> (remove temporary files after operation). 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 { |