summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-26 09:25:59 +0900
committerNorbert Preining <norbert@preining.info>2021-04-12 09:59:24 +0900
commit4903aa123d920fd77fc29e1ec7a387d758cfec1e (patch)
tree5d303fb7be666ed95d28e8a35060b38754a6714d
parentc753516575863215c90ca130213c60ac59580beb (diff)
tlmgr format rebuild semantics updatedev/post-release-merge
if create_formats option is unset, we do not build any new formats but we do recreate existing formats. This uses the new feature of fmtutil that allows pairing of --refresh with other format selection commands like --byfmt etc.
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl22
1 files changed, 12 insertions, 10 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 1f1ffc91f6d..136b27e395d 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -869,6 +869,13 @@ sub handle_execute_actions {
my $sysmode = ($opts{"usermode"} ? "-user" : "-sys");
my $invoke_fmtutil = "fmtutil$sysmode $common_fmtutil_args";
+ # of create_formats is unset (NOT the default) we add --refresh so that
+ # only existing formats are recreated
+ if (!$localtlpdb->option("create_formats")) {
+ $invoke_fmtutil .= " --refresh";
+ info("only existing formats will be refreshed per user option (create_formats=0)\n");
+ }
+
if ($::files_changed) {
$errors += do_cmd_and_check("mktexlsr");
if (defined($localtlpdb->get_package('context'))
@@ -931,9 +938,8 @@ sub handle_execute_actions {
}
}
- # format-regenerate is used when the paper size changes. In that
- # case, if option("create_formats") is set, we simply want to generate
- # all formats
+ # format-regenerate is used when the paper size changes.
+ # In that case we simply want to generate all formats
#
my %done_formats;
my %updated_engines;
@@ -957,16 +963,12 @@ sub handle_execute_actions {
for my $m (keys %{$::execute_actions{'disable'}{'formats'}}) {
$do_full = 1;
}
- my $opt_fmt = $localtlpdb->option("create_formats");
if ($do_full) {
info("regenerating fmtutil.cnf in $TEXMFDIST\n");
TeXLive::TLUtils::create_fmtutil($localtlpdb,
"$TEXMFDIST/web2c/fmtutil.cnf");
}
- if (!$opt_fmt) {
- info("formats not rebuilt per user option (create_formats=0)\n");
- }
- if ($opt_fmt && !$::regenerate_all_formats) {
+ if (!$::regenerate_all_formats) {
# first regenerate all formats --byengine
for my $e (keys %updated_engines) {
debug ("updating formats based on $e\n");
@@ -997,13 +999,13 @@ sub handle_execute_actions {
# Use full path for external command, except on Windows.
$lang = "$TEXMFSYSVAR/tex/generic/config/$lang";
}
- if ($opt_fmt && !$::regenerate_all_formats) {
+ if (!$::regenerate_all_formats) {
$errors += do_cmd_and_check ("$invoke_fmtutil --byhyphen \"$lang\"");
}
}
}
- if ($opt_fmt && $::regenerate_all_formats) {
+ if ($::regenerate_all_formats) {
info("Regenerating all formats, this may take some time ...");
$errors += do_cmd_and_check("$invoke_fmtutil --all");
info("done\n");