summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl48
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm13
2 files changed, 25 insertions, 36 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
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index edbf11675e6..6fa0736ac53 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -79,7 +79,7 @@ C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure
TeXLive::TLUtils::install_packages($from_tlpdb,$media,$to_tlpdb,$what,$opt_src, $opt_doc)>);
TeXLive::TLUtils::install_package($what, $filelistref, $target, $platform);
TeXLive::TLUtils::do_postaction($how, $tlpobj, $do_fileassocs, $do_menu, $do_desktop, $do_script);
- TeXLive::TLUtils::announce_execute_actions($how, @executes);
+ TeXLive::TLUtils::announce_execute_actions($how, @executes, $what);
TeXLive::TLUtils::add_symlinks($root, $arch, $sys_bin, $sys_man, $sys_info);
TeXLive::TLUtils::remove_symlinks($root, $arch, $sys_bin, $sys_man, $sys_info);
TeXLive::TLUtils::w32_add_to_path($bindir, $multiuser);
@@ -1935,10 +1935,11 @@ sub parse_into_keywords {
return($error, %ret);
}
-=item C<announce_execute_actions($how, $tlpobj)>
+=item C<announce_execute_actions($how, $tlpobj, $what)>
Announces that the actions given in C<$tlpobj> should be executed
-after all packages have been unpacked.
+after all packages have been unpacked. C<$what> provides
+additional information.
=cut
@@ -1955,6 +1956,12 @@ sub announce_execute_actions {
$::files_changed = 1;
return;
}
+ if (defined($type) && ($type eq "rebuild-format")) {
+ # rebuild-format must feed in a hashref of a parse_AddFormat_line data
+ # the $tlp argument is not used
+ $::execute_actions{'enable'}{'formats'}{$what->{'name'}} = $what;
+ return;
+ }
if (!defined($type) || (($type ne "enable") && ($type ne "disable"))) {
die "announce_execute_actions: enable or disable, not type $type";
}