From ce4684a048ca7fdc6af3088366e4a5dbe517bf1a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 17 Apr 2021 16:40:44 +0900 Subject: fmtutil: put most important command at head of invocation --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/scripts') diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index f57d5ec348e..8d3430ec74e 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -867,12 +867,13 @@ sub handle_execute_actions { my $errors = 0; my $sysmode = ($opts{"usermode"} ? "-user" : "-sys"); - my $invoke_fmtutil = "fmtutil$sysmode $common_fmtutil_args"; + my $fmtutil_cmd = "fmtutil$sysmode"; + my $fmtutil_args = $common_fmtutil_args; # if create_formats is false (NOT the default) we add --refresh so that # only existing formats are recreated if (!$localtlpdb->option("create_formats")) { - $invoke_fmtutil .= " --refresh"; + $fmtutil_args .= " --refresh"; debug("refreshing only existing formats per user option (create_formats=0)\n"); } @@ -973,7 +974,7 @@ sub handle_execute_actions { for my $e (keys %updated_engines) { debug ("updating formats based on $e\n"); $errors += do_cmd_and_check - ("$invoke_fmtutil --no-error-if-no-format --byengine $e"); + ("$fmtutil_cmd --byengine $e --no-error-if-no-format $fmtutil_args"); } # now rebuild all other formats for my $f (keys %do_enable) { @@ -981,7 +982,7 @@ sub handle_execute_actions { # ignore disabled formats next if !$::execute_actions{'enable'}{'formats'}{$f}{'mode'}; debug ("(re)creating format dump $f\n"); - $errors += do_cmd_and_check ("$invoke_fmtutil --byfmt $f"); + $errors += do_cmd_and_check ("$fmtutil_cmd --byfmt $f $fmtutil_args"); $done_formats{$f} = 1; } } @@ -1000,7 +1001,7 @@ sub handle_execute_actions { $lang = "$TEXMFSYSVAR/tex/generic/config/$lang"; } if (!$::regenerate_all_formats) { - $errors += do_cmd_and_check ("$invoke_fmtutil --byhyphen \"$lang\""); + $errors += do_cmd_and_check ("$fmtutil_cmd --byhyphen \"$lang\" $fmtutil_args"); } } } @@ -1010,7 +1011,7 @@ sub handle_execute_actions { if ($::regenerate_all_formats) { info("Regenerating existing formats, this may take some time ..."); # --refresh might already be in $invoke_fmtutil, but we don't care - $errors += do_cmd_and_check("$invoke_fmtutil --refresh --all"); + $errors += do_cmd_and_check("$fmtutil_cmd --refresh --all $fmtutil_args"); info("done\n"); $::regenerate_all_formats = 0; } -- cgit v1.2.3