diff options
author | Norbert Preining <preining@logic.at> | 2011-08-05 06:27:04 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2011-08-05 06:27:04 +0000 |
commit | d68992e6b7de4c94e6841019eb3b27e725c1fae4 (patch) | |
tree | 08934aa06a8f4f28be1a29f90cff76c118f77f04 /Master/texmf | |
parent | 9506bed78f3e725e6de5b7ff852e9344e25bc857 (diff) |
fix some bugs in depending format handling
git-svn-id: svn://tug.org/texlive/trunk@23420 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 9465942d9ac..9461482be3f 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -555,7 +555,13 @@ sub do_cmd_and_check # tlmgr front ends (MacOSX's TeX Live Utility) can read it # and show it to the user before the possibly long delay. info("running $cmd ...\n"); - my ($out, $ret) = TeXLive::TLUtils::run_cmd("$cmd 2>&1"); + my ($out, $ret); + if ($opts{"dry-run"}) { + $ret = 0; + $out = ""; + } else { + ($out, $ret) = TeXLive::TLUtils::run_cmd("$cmd 2>&1"); + } if ($ret == 0) { info("done running $cmd.\n"); log("--output of $cmd:\n$out\n--end of output of $cmd."); @@ -670,18 +676,25 @@ sub handle_execute_actions # 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. - my @check_indirect_formats; - 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 (@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"); + # + # 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 (@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 @@ -2855,8 +2868,10 @@ 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. - TeXLive::TLUtils::announce_execute_actions("latex-updated") if ($updated{"latex"}); - TeXLive::TLUtils::announce_execute_actions("tex-updated") if ($updated{"tex"}); + if (!$opts{"list"}) { + TeXLive::TLUtils::announce_execute_actions("latex-updated") if ($updated{"latex"}); + TeXLive::TLUtils::announce_execute_actions("tex-updated") if ($updated{"tex"}); + } print "end-of-updates\n" if $::machinereadable; |