summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/fmtutil.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/texlive/fmtutil.pl b/Master/texmf-dist/scripts/texlive/fmtutil.pl
index ca2eac40259..3882fc2a87e 100755
--- a/Master/texmf-dist/scripts/texlive/fmtutil.pl
+++ b/Master/texmf-dist/scripts/texlive/fmtutil.pl
@@ -587,12 +587,28 @@ sub select_and_rebuild_format {
}
}
if ($doit) {
+ check_and_warn_on_user_format($fmt,$eng);
return rebuild_one_format($fmt,$eng,$kpsefmt,$destdir,$fmtfile,$logfile);
} else {
return $FMT_NOTSELECTED;
}
}
+sub check_and_warn_on_user_format {
+ my ($fmt, $eng) = @_;
+ # do nothing if we are updating files in $TEXMFVAR
+ return if ($opts{'fmtdir'} eq $TEXMFVAR);
+ my $saved_fmtdir = $opts{'fmtdir'};
+ $opts{'fmtdir'} = "$TEXMFVAR/web2c";
+ my ($kpsefmt, $destdir, $fmtfile, $logfile) = compute_format_destination($fmt, $eng);
+ if (-r "$destdir/$fmtfile") {
+ print_deferred_warning("you have a shadowing format dump in TEXMFVAR for $fmt/$eng!!!\n");
+ }
+ $opts{'fmtdir'} = $saved_fmtdir;
+}
+
+
+
# compute_format_destination
# takes fmt/eng and returns the locations where format and log files
# should be saved, that is, a list: (dump file full path, log file full path)