summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2015-11-28 02:15:39 +0000
committerNorbert Preining <preining@logic.at>2015-11-28 02:15:39 +0000
commit7da8a16f77433d9b267a7e8ad9e79637cf56368f (patch)
tree4fb7c8150d2dddb212aec174cdb85e514d8b73e3
parent87123a2ef9f151450743de8d760aadd34d561aca (diff)
some work on triggering format rebuilds
git-svn-id: svn://tug.org/texlive/trunk@38965 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl35
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm11
2 files changed, 23 insertions, 23 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index e45e2315813..cc587a02718 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -832,13 +832,9 @@ sub handle_execute_actions {
# do this only if we are not in --list or --dry-run mode
if (!$opts{"list"}) {
my @check_indirect_formats;
- # TODO:
- # in case that hyphenation patterns are changed, ie $regenerate_language
- # then maybe we don't need to update latex based ones?
- 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 (@::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)) {
@@ -3301,12 +3297,8 @@ 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.
- if (!$opts{"list"}) {
- if ($updated{"latex"} || $updated{"babel"}) {
- TeXLive::TLUtils::announce_execute_actions("latex-updated");
- }
- TeXLive::TLUtils::announce_execute_actions("tex-updated") if ($updated{"tex"});
- }
+ check_announce_format_triggers(@inst_packs, @new_packs)
+ if (!$opts{"list"});
print "end-of-updates\n" if $::machinereadable;
@@ -3462,6 +3454,23 @@ 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");
+ }
+ TeXLive::TLUtils::announce_execute_actions("tex-updated") if ($updated{"tex"});
+}
+
# INSTALL
#
# tlmgr install foo bar baz
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 535dacf71e6..edbf11675e6 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -116,11 +116,10 @@ use vars qw(
$::LOGFILENAME @::LOGLINES
@::debug_hook @::ddebug_hook @::dddebug_hook @::info_hook @::warn_hook
@::install_packages_hook
- $::latex_updated
+ @::fmt_triggers
$::machinereadable
$::no_execute_actions
$::regenerate_all_formats
- $::tex_updated
$TeXLive::TLDownload::net_lib_avail
);
@@ -1956,14 +1955,6 @@ sub announce_execute_actions {
$::files_changed = 1;
return;
}
- if (defined($type) && ($type eq "latex-updated")) {
- $::latex_updated = 1;
- return;
- }
- if (defined($type) && ($type eq "tex-updated")) {
- $::tex_updated = 1;
- return;
- }
if (!defined($type) || (($type ne "enable") && ($type ne "disable"))) {
die "announce_execute_actions: enable or disable, not type $type";
}