summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2011-06-23 04:29:44 +0000
committerNorbert Preining <preining@logic.at>2011-06-23 04:29:44 +0000
commit7abff6e04dec661174801a896dd9c9c459e11a79 (patch)
tree1e0ff6d6dd81bc9b7338f61cf89b26d24a316062 /Master/texmf/scripts
parent1170aabd5592f21231e161c505c8454013a04c50 (diff)
tlmgr: fix a bug when both format changes and hyphenation pattern are
changed in the same run, but the post action handling did update the language* files only *after* the format change induced calls to fmtutil-sys are finished. Now we first check for the need to recreate language*, then to recreate fmtutil.cnf, and then run the respective calls git-svn-id: svn://tug.org/texlive/trunk@23103 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl70
1 files changed, 40 insertions, 30 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index da79c195ec6..9e1ca3afd96 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -633,11 +633,42 @@ sub handle_execute_actions
$errors += do_cmd_and_check("updmap-sys") if $updmap_run_needed;
}
+ # format relevant things
+ # we first have to check if the config files, that is fmtutil.cnf
+ # or one of the language* files have changed, regenerate them
+ # if necessary, and then run the necessary fmtutil calls.
- # format-regenerate is used when the paper size changes. In that
- # case, if option("create_formats") is set, we simply want to generate
- #
{
+ # first check for language* files
+ my $regenerate_language = 0;
+ for my $m (keys %{$::execute_actions{'enable'}{'hyphens'}}) {
+ $regenerate_language = 1;
+ last;
+ }
+ for my $m (keys %{$::execute_actions{'disable'}{'hyphens'}}) {
+ $regenerate_language = 1;
+ last;
+ }
+ if ($regenerate_language) {
+ for my $ext ("dat", "def", "dat.lua") {
+ my $lang = "language.$ext";
+ info("regenerating $lang\n");
+ my $arg1 = "$TEXMFSYSVAR/tex/generic/config/language.$ext";
+ my $arg2 = "$TEXMFLOCAL/tex/generic/config/language-local.$ext";
+ if ($ext eq "dat") {
+ TeXLive::TLUtils::create_language_dat($localtlpdb, $arg1, $arg2);
+ } elsif ($ext eq "def") {
+ TeXLive::TLUtils::create_language_def($localtlpdb, $arg1, $arg2);
+ } else {
+ TeXLive::TLUtils::create_language_lua($localtlpdb, $arg1, $arg2);
+ }
+ }
+ }
+
+ # 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
+ #
my %done_formats;
my %updated_engines;
my %format_to_engine;
@@ -683,37 +714,16 @@ sub handle_execute_actions
$done_formats{$f} = 1;
}
}
- }
- #
- # hyphenation patterns
- # if something has changed do the whole stuff ...
- {
- my $do_something = 0;
- for my $m (keys %{$::execute_actions{'enable'}{'hyphens'}}) {
- $do_something = 1;
- last;
- }
- for my $m (keys %{$::execute_actions{'disable'}{'hyphens'}}) {
- $do_something = 1;
- last;
- }
+ # now go back to the hyphenation patterns and regenerate formats
+ # based on the various language files
+ # this of course will in some cases duplicate fmtutil calls,
+ # but it is much easier than actually checking which formats
+ # don't need to be updated
- if ($do_something) {
+ if ($regenerate_language) {
for my $ext ("dat", "def", "dat.lua") {
my $lang = "language.$ext";
- info("regenerating $lang\n");
-
- my $arg1 = "$TEXMFSYSVAR/tex/generic/config/language.$ext";
- my $arg2 = "$TEXMFLOCAL/tex/generic/config/language-local.$ext";
- if ($ext eq "dat") {
- TeXLive::TLUtils::create_language_dat($localtlpdb, $arg1, $arg2);
- } elsif ($ext eq "def") {
- TeXLive::TLUtils::create_language_def($localtlpdb, $arg1, $arg2);
- } else {
- TeXLive::TLUtils::create_language_lua($localtlpdb, $arg1, $arg2);
- }
-
if (! TeXLive::TLUtils::win32()) {
# Use full path for external command, except on Windows.
$lang = "$TEXMFSYSVAR/tex/generic/config/$lang";