summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm50
1 files changed, 50 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 78f622506dd..e58eefc7d37 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -60,6 +60,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);
+ TeXLive::TLUtils::announce_execute_actions($how, @executes);
=head2 Miscellaneous
@@ -121,6 +122,7 @@ BEGIN {
&tlmd5
&xsystem
&run_cmd
+ &announce_execute_actions
);
@EXPORT = qw(setup_programs download_file process_logging_options
tlwarn info log debug ddebug dddebug debug_hash
@@ -1621,6 +1623,54 @@ sub parse_into_keywords {
return($error, %ret);
}
+=item C<announce_execute_actions($how, $tlpobj)>
+
+Announces that the actions given in C<$tlpobj> should be executed
+after all packages have been unpacked.
+
+=cut
+
+sub announce_execute_actions {
+ my ($type, $tlp) = @_;
+ if (defined($type) && ($type eq "regenerate-formats")) {
+ $::regenerate_all_formats = 1;
+ return;
+ }
+ if (defined($type) && ($type eq "files-changed")) {
+ $::files_changed = 1;
+ return;
+ }
+ if (!defined($type) || (($type ne "enable") && ($type ne "disable"))) {
+ die "announce_execute_actions: enable or disable, not type $type";
+ }
+ my (@maps, @formats, @dats);
+ if ($tlp->runfiles || $tlp->srcfiles || $tlp->docfiles) {
+ $::files_changed = 1;
+ }
+ foreach my $e ($tlp->executes) {
+ if ($e =~ m/^add((Mixed)?Map)\s+([^\s]+)\s*$/) {
+ $::execute_actions{$type}{'maps'}{$3} = "$1";
+ } elsif ($e =~ m/^AddFormat\s+(.*)\s*$/) {
+ my %r = TeXLive::TLUtils::parse_AddFormat_line("$1");
+ if (defined($r{"error"})) {
+ tlwarn ("$r{'error'} in parsing $e for return hash\n");
+ } else {
+ $::execute_actions{$type}{'formats'}{$r{'name'}} = \%r;
+ }
+ } elsif ($e =~ m/^AddHyphen\s+(.*)\s*$/) {
+ my %r = TeXLive::TLUtils::parse_AddHyphen_line("$1");
+ if (defined($r{"error"})) {
+ tlwarn ("$r{'error'} in parsing $e for return hash\n");
+ } else {
+ $::execute_actions{$type}{'hyphens'}{$r{'name'}} = \%r;
+ }
+ } else {
+ tlwarn("Unknown execute $e in ", $self->name, "\n");
+ }
+ }
+}
+
+
=item C<untar($tarfile,$targetdir, $remove_tarfile)>
Unpacked C<$tarfile> in C<$targetdir> (changing directories to