diff options
author | Norbert Preining <preining@logic.at> | 2009-08-24 09:57:17 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-08-24 09:57:17 +0000 |
commit | 7fdcfd3a86421bad13037ef20bd39c5e233bdd2b (patch) | |
tree | ddc3c947fe33ae11924d78102310e35e124946df /Master | |
parent | 159c19eb4e623643734ae7634cc8a6f10dd5e8a4 (diff) |
use fmtutil-sys --byengine instead of heuristics in tlmgr post action
git-svn-id: svn://tug.org/texlive/trunk@14840 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 1cf3384557a..aa5cf5312d6 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -543,6 +543,7 @@ sub handle_execute_actions { my %done_formats; my %updated_engines; + my %format_to_engine; my %do_enable; my $do_full = 0; for my $m (keys %{$::execute_actions{'enable'}{'formats'}}) { @@ -553,6 +554,7 @@ sub handle_execute_actions if (!defined($foo{'name'}) || !defined($foo{'engine'})) { tlwarn("Very strange error, please report " . %foo); } else { + $format_to_engine{$m} = $foo{'engine'}; if ($foo{'name'} eq $foo{'engine'}) { $updated_engines{$m} = 1; } @@ -569,33 +571,18 @@ sub handle_execute_actions "$TEXMFLOCAL/web2c/fmtutil-local.cnf"); } if ($opt_fmt && !$::regenerate_all_formats) { + # first regenerate all formats --byengine + for my $e (keys %updated_engines) { + log ("updating formats based on $e\n"); + $errors += do_cmd_and_check("fmtutil-sys --byengine $e"); + } + # now rebuild all other formats for my $f (keys %do_enable) { + next if defined($updated_engines{$format_to_engine{$f}}); log ("(re)creating format dump $f\n"); $errors += do_cmd_and_check("fmtutil-sys --byfmt $f"); $done_formats{$f} = 1; } - - # check that if an engine is updated that all formats that are based on - # that engine are also updated - my @upen = keys %updated_engines; - if (@upen) { - for my $d ($localtlpdb->format_definitions) { - my %def = %$d; - if (defined($def{'engine'})) { - next if defined($done_formats{$def{'name'}}); - # do not regenerate disabled formats (mode=disabled which is - # translated to $def{'mode'} = 0|1 - next if (defined($def{'mode'}) && !$def{'mode'}); - for my $e (@upen) { - if ($def{'engine'} eq $e) { - log ("updating format $def{'name'} (engine $e updated)\n"); - $errors += do_cmd_and_check("fmtutil-sys --byfmt $def{'name'}"); - $done_formats{$def{'name'}} = 1; - } - } - } - } - } } } |