summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-20 08:03:25 +0900
committerNorbert Preining <norbert@preining.info>2021-05-09 10:58:54 +0900
commit621564875ceec62c0706c219ee14e3be8edfc8d9 (patch)
tree69ae03588681dba6b9f46bb9f6d5e26cc9459732
parent0f8ba4ddaaa751e5f5cb00b681f1e4eafaf2ea1d (diff)
fmtutil: only try to use TEXMFSYSVAR for mktexfmt
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index e39971a7965..4bc22da9fec 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -4626,9 +4626,13 @@ sub setup_sys_user_mode {
} elsif ($optsref->{'user'}) {
$texmfconfig = $TEXMFCONFIG;
$texmfvar = $TEXMFVAR;
- # for fmtutil we try to use TEXMFSYSVAR if it is writable since
- # stray formats are some of the biggest problems reported
- if ($prg eq "fmtutil" || $prg eq "mktexfmt") {
+ # mktexfmt is often run accidentally by a user with missing formats
+ # and the resulting format dumps are put into TEXMFVAR, which is
+ # one of the most common source of problems.
+ # Only for mktexfmt (but not for fmtutil, which would need to be called
+ # explicitely with fmtutil -user) we check whether TEXMFSYSVAR is writable
+ # and if yes, create formats there.
+ if ($prg eq "mktexfmt") {
my $switchit = 0;
if (-d "$TEXMFSYSVAR/web2c") {
$switchit = 1 if (-w "$TEXMFSYSVAR/web2c");