diff options
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index b0a5055faa8..50a41ff3098 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -167,6 +167,7 @@ BEGIN { &give_ctan_mirror &give_ctan_mirror_base &create_mirror_list + &extract_mirror_entry &tlmd5 &xsystem &run_cmd @@ -1826,7 +1827,7 @@ after all packages have been unpacked. =cut sub announce_execute_actions { - my ($type, $tlp) = @_; + my ($type, $tlp, $what) = @_; # do simply return immediately if execute actions are suppressed return if $::no_execute_actions; @@ -1838,6 +1839,14 @@ 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"; } @@ -1845,22 +1854,26 @@ sub announce_execute_actions { if ($tlp->runfiles || $tlp->srcfiles || $tlp->docfiles) { $::files_changed = 1; } + $what = "map format hyphen" if (!defined($what)); foreach my $e ($tlp->executes) { if ($e =~ m/^add((Mixed)?Map)\s+([^\s]+)\s*$/) { - $::execute_actions{$type}{'maps'}{$3} = "$1"; + $::execute_actions{$type}{'maps'}{$3} = "$1" + if ($what =~ m/map/); } 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; + $::execute_actions{$type}{'formats'}{$r{'name'}} = \%r + if ($what =~ m/format/); } } 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; + $::execute_actions{$type}{'hyphens'}{$r{'name'}} = \%r + if ($what =~ m/hyphen/); } } else { tlwarn("Unknown execute $e in ", $tlp->name, "\n"); @@ -3429,8 +3442,15 @@ sub give_ctan_mirror =item C<create_mirror_list()> -Returns the lists of viable mirrors according to mirrors.pl, in -a list which also contains continents, and country headers. +=item C<extract_mirror_entry($listentry)> + +C<create_mirror_list> returns the lists of viable mirrors according to +mirrors.pl, in a list which also contains continents, and country headers. + +C<extract_mirror_entry> extracts the actual repository data from one +of these entries. + +# KEEP THESE TWO FUNCTIONS IN SYNC!!! =cut @@ -3462,6 +3482,14 @@ sub create_mirror_list { return @ret; } +# extract_mirror_entry is not very intelligent, it assumes that +# the last "word" is the URL +sub extract_mirror_entry { + my $ent = shift; + my @foo = split ' ', $ent; + return $foo[$#foo]; +} + sub tlmd5 { my ($file) = @_; if (-r $file) { |