summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2011-06-20 03:33:04 +0000
committerNorbert Preining <preining@logic.at>2011-06-20 03:33:04 +0000
commite99a06772573cfbfe83cb9e6529a04bf2dd75323 (patch)
treea5baec26968d50fb6fbe9a72a5cbd05674df594c /Master/texmf
parentdfc63ba64601303fdbecba9999e782a9514fe6df (diff)
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
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl38
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