summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2015-11-28 02:15:47 +0000
committerNorbert Preining <preining@logic.at>2015-11-28 02:15:47 +0000
commitc44cc5bdbd852739631251c53d3119bc006172d3 (patch)
treecca38bc08143d9968567a3edd537e91df5d9f296 /Master/texmf-dist
parent7da8a16f77433d9b267a7e8ad9e79637cf56368f (diff)
format triggers
git-svn-id: svn://tug.org/texlive/trunk@38966 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl48
1 files changed, 15 insertions, 33 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index cc587a02718..dfe36bfcd58 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -823,28 +823,6 @@ 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.
- #
- # do this only if we are not in --list or --dry-run mode
- if (!$opts{"list"}) {
- my @check_indirect_formats;
- for my $p (@::fmt_triggers) {
- push @check_indirect_format, $localtlpdb->triggered_by($p);
- }
- 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
@@ -3457,18 +3435,22 @@ END_DISK_WARN
sub check_announce_format_triggers {
# we treat new and updated packages the same as updated
# when it comes to triggers
- my (@updpacks) = @_;
-
- tlwarn("
- TODO TODO TODO
- Here we need somehow to call out for all packages update
- we need to loop over all packages, and collect all trigger.FORMAT\n");
-
- # old code
- if ($updated{"latex"} || $updated{"babel"}) {
- TeXLive::TLUtils::announce_execute_actions("latex-updated");
+ my %updpacks = map { $_ => 1 } @_;
+
+ # search all format definitions in the tlpdb
+ FMTDEF: for my $fmtdef ($localtlpdb->format_definitions) {
+ # if by default they are activated, check the whether the
+ # trigger packages appear in the list of updated/new packages
+ if (($fmtdef->{'mode'} == 1) && $fmtdef->{'triggers'}) {
+ for my $trigger (@{$fmtdef->{'triggers'}}) {
+ if ($updpacks{$trigger}) {
+ TeXLive::TLUtils::announce_execute_actions("rebuild-format",
+ 0, $fmtdef);
+ next FMTDEF;
+ }
+ }
+ }
}
- TeXLive::TLUtils::announce_execute_actions("tex-updated") if ($updated{"tex"});
}
# INSTALL