From e99a06772573cfbfe83cb9e6529a04bf2dd75323 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 20 Jun 2011 03:33:04 +0000 Subject: don't run updmap uselessly if generate_updmap option is set git-svn-id: svn://tug.org/texlive/trunk@23063 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/tlmgr.pl | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'Master/texmf/scripts') 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 -- cgit v1.2.3