texlive[58959] Master/texmf-dist/scripts/texlive/fmtutil.pl: fmtutil:
commits+preining at tug.org
commits+preining at tug.org
Thu Apr 22 02:51:54 CEST 2021
Revision: 58959
http://tug.org/svn/texlive?view=revision&revision=58959
Author: preining
Date: 2021-04-22 02:51:54 +0200 (Thu, 22 Apr 2021)
Log Message:
-----------
fmtutil: warn on shadowing formats
Modified Paths:
--------------
trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl
Modified: trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl 2021-04-22 00:51:46 UTC (rev 58958)
+++ trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl 2021-04-22 00:51:54 UTC (rev 58959)
@@ -587,6 +587,7 @@
}
}
if ($doit) {
+ check_and_warn_on_user_format($fmt,$eng);
return rebuild_one_format($fmt,$eng,$kpsefmt,$destdir,$fmtfile,$logfile);
} else {
return $FMT_NOTSELECTED;
@@ -593,6 +594,21 @@
}
}
+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)
More information about the tex-live-commits
mailing list.