From 08d74423c54b4d5f76dd5a34e46395e7070863fa Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 5 Aug 2011 00:09:21 +0000 Subject: update depending formats based on dependencies, currently only for latex and tex git-svn-id: svn://tug.org/texlive/trunk@23411 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/tlmgr.pl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'Master/texmf/scripts') diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 2c60072fa3f..9465942d9ac 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -665,6 +665,25 @@ sub handle_execute_actions } } + # + # check if *depending* formats have been changed + # we are currently only caring for package "latex" and "tex". If + # one of these has changed, we search for all packages *depending* + # on latex/tex and regenerate all formats in these packages. + my @check_indirect_formats; + push @check_indirect_formats, $localtlpdb->needed_by("latex") + if ($::latex_updated); + push @check_indirect_formats, $localtlpdb->needed_by("tex") + if ($::tex_updated); + for my $p (@check_indirect_formats) { + my $tlp = $localtlpdb->get_package($p); + if (!defined($tlp)) { + tlwarn("$p mentioned but not found in local tlpdb, strange!\n"); + next; + } + TeXLive::TLUtils::announce_execute_actions("enable", $tlp, "format"); + } + # 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 @@ -2832,6 +2851,12 @@ sub action_update { } } + # + # special check for depending format updates: + # if one of latex or tex has been updated, we rebuild the formats + # defined in packages *depending* on these packages. + TeXLive::TLUtils::announce_execute_actions("latex-updated") if ($updated{"latex"}); + TeXLive::TLUtils::announce_execute_actions("tex-updated") if ($updated{"tex"}); print "end-of-updates\n" if $::machinereadable; -- cgit v1.2.3