summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-06-09 19:01:28 +0000
committerNorbert Preining <preining@logic.at>2009-06-09 19:01:28 +0000
commitcb518f00d6f555ef49f18b12c7c8dcb2576d2956 (patch)
tree2c042c83d3bd899f752810fb0ca48da788485671 /Master/texmf
parentd6c1b1aca9daa4545cfd8b0a28c99f0d3ed47a4f (diff)
update all depending formats if an engine has been updated
git-svn-id: svn://tug.org/texlive/trunk@13683 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl33
1 files changed, 31 insertions, 2 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 581ac3aff1f..10fa01371a7 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -478,17 +478,26 @@ sub handle_execute_actions {
chomp(my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`);
- # format means create missing formats (because a new one was added).
# 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; if not, then we only want to refresh existing ones.
#
{
+ my %done_formats;
+ my %updated_engines;
my %do_enable;
my $do_full = 0;
for my $m (keys %{$::execute_actions{'enable'}{'formats'}}) {
$do_full = 1;
$do_enable{$m} = 1;
+ # here we check whether an engine is updated
+ my %foo = %{$::execute_actions{'enable'}{'formats'}{$m}};
+ if (!defined($foo{'name'}) || !defined($foo{'engine'})) {
+ tlwarn("Very strange error, please report " . %foo);
+ } else {
+ if ($foo{'name'} eq $foo{'engine'}) {
+ $updated_engines{$m} = 1;
+ }
+ }
}
for my $m (keys %{$::execute_actions{'disable'}{'formats'}}) {
$do_full = 1;
@@ -504,6 +513,26 @@ sub handle_execute_actions {
for my $f (keys %do_enable) {
info ("(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'}});
+ for my $e (@upen) {
+ if ($def{'engine'} eq $e) {
+ info("updating format $def{'name'} (engine $e updated)\n");
+ $errors += do_cmd_and_check("fmtutil-sys --byfmt $def{'name'}");
+ $done_formats{$def{'name'}} = 1;
+ }
+ }
+ }
+ }
}
}
}