rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

tlmgr restore fails #72

Closed eschen42 closed 6 years ago

eschen42 commented 6 years ago

I have an issue trying to run tlmgr restore on rocker/verse:3.4.1. Any suggestions? Thank you.

Here are the particulars:

I get tlmgr backup to run with no apparent error with my script, "tlmgr_pkg":

#!/usr/bin/env bash
tlmgr update --self
tlmgr install microtype; tlmgr backup --backupdir ~/tl_backup microtype
tlmgr install euler; tlmgr backup --backupdir ~/tl_backup euler
tlmgr install merriweather; tlmgr backup --backupdir ~/tl_backup merriweather
# etc

I have a script, "tlmgr_restore"

#!/usr/bin/env bash
tlmgr update --self
tlmgr restore --backupdir ~/tl_backup --all

but, when I run this script, it fails and does not restore packages, e.g.:

Restoring abstract, 15878 from /home/rstudio/tl_backup/abstract.r15878.tar.xz
Use of uninitialized value $whatsize in concatenation (.) or string at /opt/TinyTeX/tlpkg/TeXLive/TLPDB.pm line 2057, <STDIN> line 1.
Use of uninitialized value $whatcheck in concatenation (.) or string at /opt/TinyTeX/tlpkg/TeXLive/TLPDB.pm line 2057, <STDIN> line 1.
TLUtils::check_file: neither checksum nor checksize available for /tmp/apDOqxh79Z/rfd5DTEGqe/abstract.r15878.tar.xz, cannot check integrity!
Restoring achemso, 46557 from /home/rstudio/tl_backup/achemso.r46557.tar.xz
Use of uninitialized value $whatsize in concatenation (.) or string at /opt/TinyTeX/tlpkg/TeXLive/TLPDB.pm line 2057, <TMP> line 20.
Use of uninitialized value $whatcheck in concatenation (.) or string at /opt/TinyTeX/tlpkg/TeXLive/TLPDB.pm line 2057, <TMP> line 20.
TLUtils::check_file: neither checksum nor checksize available for /tmp/apDOqxh79Z/BGugyzlsBw/achemso.r46557.tar.xz, cannot check integrity!
cboettig commented 6 years ago

Can you check the value of no-checksums in your tlmgr config? Seems your backup step isn't creating checksums; maybe we're missing an optional dependency or something.

@yihui Any insight on this one? I don't really know tlmgr well so I'm shooting from the hip here.

yihui commented 6 years ago

I have never used tlmgr backup or tlmgr restore by myself, and I have no idea here.

cboettig commented 6 years ago

@eschen42 Are you sore that it is not restoring? I think these are just warnings. Here's the log I see:

rstudio@b37545298d15:~$ tlmgr restore --backupdir ~/tl_backup --all
Do you really want to restore all packages to the latest revision found in
        /home/rstudio/tl_backup
===> (y/N): y
Restoring multirow, 42588 from /home/rstudio/tl_backup/multirow.r42588.tar.xz
TLPDB: package not present, so nothing to remove: multirow
Use of uninitialized value $whatsize in concatenation (.) or string at /opt/TinyTeX/tlpkg/TeXLive/TLPDB.pm line 2057, <STDIN> line 1.
Use of uninitialized value $whatcheck in concatenation (.) or string at /opt/TinyTeX/tlpkg/TeXLive/TLPDB.pm line 2057, <STDIN> line 1.
TLUtils::check_file: neither checksum nor checksize available for /tmp/5tW67J3SH7/2zI7hqFn3x/multirow.r42588.tar.xz, cannot check integrity!
running mktexlsr ...
done running mktexlsr.
tlmgr: package log updated: /opt/TinyTeX/texmf-var/web2c/tlmgr.log

Note the same warnings, but it then updates the package. I verified that if I backup the package, remove the package, and then restore the backup, the package is indeed installed (at the version backed up of course). So I think everything is fine despite not checking the checksum on the backup. In any event, I definitely suggest digging more into the config as documented https://www.tug.org/texlive/doc/tlmgr.html if tlmgr backup isn't acting as you expect. (Not sure why the checksum support isn't included though since openssl is installed, maybe has to do with libs available when tlmgr is compiled...) In any event, I don't think tlmgr restore is failing, but feel free to re-open if I've got this wrong.