summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-04-22 00:45:32 +0000
committerNorbert Preining <preining@logic.at>2021-04-22 00:45:32 +0000
commit616ca63b3b4a357df8894621d76e07231e66874e (patch)
tree394df3a665d084279a61a00e2e77c2df19e05981
parent78687655bbf462ba23457298505dedbfd8c89e5e (diff)
fmtutil: only try to use TEXMFSYSVAR for mktexfmt
git-svn-id: svn://tug.org/texlive/trunk@58956 c570f23f-e606-0410-a88d-b1316a301751
-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 63d2dd65440..4769fb35256 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -4582,9 +4582,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");