diff options
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 95fafe402e4..da79c195ec6 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -596,22 +596,16 @@ sub handle_execute_actions # if only disabled -> disable it # if the option "generate_updmap" is set, then simply ignore all that # and run the equivalent of tlmgr generate updmap - my $run_full = 0; - if ($localtlpdb->option("generate_updmap")) { - my $dest = "$TEXMFSYSCONFIG/web2c/updmap.cfg"; - my $localcfg = "$TEXMFLOCAL/web2c/updmap-local.cfg"; - debug("$0: writing new updmap.cfg to $dest\n"); - TeXLive::TLUtils::create_updmap($localtlpdb, $dest, $localcfg); - $run_full = 1; - } else { + { + my $updmap_run_needed = 0; my %do_enable; my %do_disable; for my $m (keys %{$::execute_actions{'enable'}{'maps'}}) { - $run_full = 1; + $updmap_run_needed = 1; $do_enable{$m} = 1; } for my $m (keys %{$::execute_actions{'disable'}{'maps'}}) { - $run_full = 1; + $updmap_run_needed = 1; if (defined($do_enable{$m})) { # we are upgrading because it is disabled and enabled, so # delete the entry in do_enable, it is already @@ -621,17 +615,23 @@ sub handle_execute_actions $do_disable{$m} = 1; } } - for my $m (keys %do_disable) { - $errors += do_cmd_and_check("updmap-sys --nomkmap --nohash --disable $m"); - } - for my $m (keys %do_enable) { - my $str = "updmap-sys --nomkmap --nohash --enable " . - $::execute_actions{'enable'}{'maps'}{$m} . "=$m"; - $errors += do_cmd_and_check($str); + if ($updmap_run_needed && $localtlpdb->option("generate_updmap")) { + my $dest = "$TEXMFSYSCONFIG/web2c/updmap.cfg"; + my $localcfg = "$TEXMFLOCAL/web2c/updmap-local.cfg"; + debug("$0: writing new updmap.cfg to $dest\n"); + TeXLive::TLUtils::create_updmap($localtlpdb, $dest, $localcfg); + } else { + for my $m (keys %do_disable) { + $errors += do_cmd_and_check("updmap-sys --nomkmap --nohash --disable $m"); + } + for my $m (keys %do_enable) { + my $str = "updmap-sys --nomkmap --nohash --enable " . + $::execute_actions{'enable'}{'maps'}{$m} . "=$m"; + $errors += do_cmd_and_check($str); + } } + $errors += do_cmd_and_check("updmap-sys") if $updmap_run_needed; } - $errors += do_cmd_and_check("updmap-sys") if $run_full; - # format-regenerate is used when the paper size changes. In that |