3

Up until now I was under the impression that TeXLive's packages only updated when you invoked tlmgr update ....

But today I noticed, for the first time, that some other process is definitely updating TeXLive packages. But I have not been able to identify which. So I'm looking for advice on how to determine what is causing these updates, and possibly help on how to stop these auto-updates from happening. More details below if you'd like to read on ;-)

TLDR: TeXLive packages auto-update on irregular intervals by some mysterious process. One of these updates left me with a broken install, and now I'd like to be able to disable any auto-updates of TeXLive.

I have installed TeXLive 2020 on Ubuntu 18.04.5. I also have an old 2019 installation still in place, but all paths are since long correctly set for TL2020. I installed and maintain TeXLive (in fact, the whole system) using Ansible (I haven't made those playbooks public yet because reasons, but if you think it helps trouble-shooting this issue, I'd be happy to share the relevant parts with you).

How do I know for sure that TeXLive's packages have been updated?
Well, after a recompilation of the exact same LaTeX document (on the same git commit, clean repo) suddenly failed the second time around with an error about filehook-2019.sty not found, which made no sense, I looked for any files in the TeXLive tree that had been updated recently (i.e., today) and found a bunch, most notably (showing a selection):

$ find /usr/local/texlive -newermt "2020-12-16"
/usr/local/texlive/2020/texmf-var/web2c/tlmgr.log
/usr/local/texlive/2020/texmf-dist/doc/latex/filehook
/usr/local/texlive/2020/texmf-dist/tex/latex/filehook
/usr/local/texlive/2020/texmf-dist/source/latex/filehook
/usr/local/texlive/2020/tlpkg/tlpobj/filehook.tlpobj
/usr/local/texlive/2020/tlpkg/backups/filehook.r56291.tar.lz4
/usr/local/texlive/2020/tlpkg/backups/...

The clincher was the contents of the tlmgr.log file (again, only showing select parts):

[Sun Nov 29 04:34:29 2020] update: bookcover (46410 -> 56947)
[Tue Dec 15 21:27:05 2020] update: beamer (55908 -> 57140)
[Tue Dec 15 23:11:08 2020] update: decision-table (56164 -> 57094)
[Tue Dec 15 23:11:08 2020] update: denisbdoc (55474 -> 56664)
[Wed Dec 16 02:41:56 2020] update: fgruler (42966 -> 56854)
[Wed Dec 16 02:41:57 2020] update: filehook (56291 -> 56479)

The timings of these updates suggests that they are unrelated to my activities (which involves running latexmk, lualatex, knitr::knit()). Also, it's not an update of all available TeXLive packages, just a small subset, which I could confirm by running tlmgr update --self --all myself a short while later, which updated around 100 packages and after which my LaTeX document compiled just fine again.

I have read the relevant parts of the TeXLive and tlmgr documentation, but found no mention of auto-updates.

On my machine, I have checked the user and system cron-jobs, and found nothing that pertains to tlmgr. I also checked the systemd jobs, ditto.

If by chance it's not tlmgr that's causing these updates, then what could it be? I also have R installed on this machine (I regularly knit Rnw/Rmd documents) which includes the tinytex R package, which I know contains a wrapper for tlmgr. But unless these are being activated on some schedule, or are invoked when knitr::knit() is called, I don't see how they are the culprits (also, I run knitr::knit() almost daily, and TeXLive package auto-updates appear to happen on much longer intervals as the log file shows).

8
  • I don't have R installed these days but if knitr starts with tinytex (minimal texlive) does it run tlmgr for you for latex packages that are referenced from R? – David Carlisle Dec 16 '20 at 9:10
  • @DavidCarlisle You put your finger on the point precisely. Problem is, I'm not sure. I skimmed the knitr::knit() source code, but I can't claim to follow along well enough to determine whether it's calling tinytex::tlmgr(). And tinytex is a dependency of other R pkgs I require, so I can't simply uninstall it to try without it... – solarchemist Dec 16 '20 at 9:22
  • random google search shows up this which does indicate that tinytex can be configured to parse the log for missing packages and install them. – David Carlisle Dec 16 '20 at 14:06
  • @DavidCarlisle I considered that, but that's installation of missing packages. That did not happen in my case – solarchemist Dec 16 '20 at 17:33
  • (Stupid comment system blocking edits... when I pressed enter by mistake earlier). @DavidCarlisle That did not happen in my case, it's only package updates. And as far as I know, tinytex does not do that. Assuming that conclusion is correct, that leaves latexmk and tlmgr. But I take it from your focus on the R tools that those tools are not known to auto-update TeXLive packages either, right? But I must admit that my initial suspicions veer towards the R toolset, too. There's been so much development there, some of it focussed on making the users life easier... – solarchemist Dec 16 '20 at 17:41
2

When compiling .Rnw or .Rmd documents to PDF, the R function tinytex::latexmk() is called, which tries to install missing LaTeX packages by default. This behavior can be disabled via the option:

options(tinytex.install_packages = FALSE)

Before trying to install missing LaTeX packages, it will try to run tlmgr update --self --all. This is most likely to be the cause of the problem you observed.

2
  • 1
    Thanks for that insight! I will set this option, as you suggested, and keep an eye on the tlmgr.log etc. to see if updates keep happening, and report back here in a few days with confirmation (although I don't expect any surprises, your explanation makes a lot of sense to me). – solarchemist Dec 27 '20 at 9:01
  • One month later, many LaTeX and R re-runs later, and the tlmgr.log has not been touched. This setting definitely works as intended :-) Sorry for the delay in accepting the answer. – solarchemist Jan 24 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.