pretest: error with tlmgr and lz4 backups
Norbert Preining
preining at logic.at
Sat Mar 2 23:31:30 CET 2019
Hi Johannes,
thanks for checking and reporting back!
On Sat, 02 Mar 2019, Johannes Hielscher wrote:
> tlwarn("$0: Couldn't compress $destdir/$tarname\n");
> return (0,0, "");
> }
> - # make sure we remove the original tar since lc does not
> - # automatically remove it
> - unlink("$destdir/$tarname") if (-r "$destdir/$tarname");
> + # make sure we remove the original tar since old lz4 versions
> + # cannot automatically delete it
> + unlink("$destdir/$tarname") if ((-r "$destdir/$tarname")
> + && (-r "$destdir/$containername"));
Immediately after this there is the code
# compute the size.
if (! -r "$destdir/$containername") {
tlwarn ("$0: Couldn't find $destdir/$containername\n");
return (0, 0, "");
}
so a missing compressed file will be detected.
What would not unlinking help in this case? The .tar file would remain
in the backup directory, but tlmgr does not recognizes it for restore
purposes. Users would need to manually restore from the tar.
Furthermore, we already check for the exit code of the compressor
program, so while I see the chance that something strange happens, I
don't think leaving .tar files around would be helpful in these rare
cases.
Best
Norbert
--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
More information about the tex-live
mailing list