diff options
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 68 |
1 files changed, 38 insertions, 30 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index f9ac750477d..81332e816f4 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -114,9 +114,11 @@ use vars qw( $::LOGFILENAME @::LOGLINES @::debug_hook @::ddebug_hook @::dddebug_hook @::info_hook @::warn_hook @::install_packages_hook + $::latex_updated $::machinereadable $::no_execute_actions $::regenerate_all_formats + $::tex_updated $TeXLive::TLDownload::net_lib_avail ); @@ -2686,43 +2688,49 @@ sub create_updmap { sub check_for_old_updmap_cfg { chomp( my $tmfsysconf = `kpsewhich -var-value=TEXMFSYSCONFIG` ) ; - if (-r "$tmfsysconf/web2c/updmap.cfg") { - # assume that succeeds, we tested -r above! - open (FOO, "<$tmfsysconf/web2c/updmap.cfg"); - chomp( my $firstline = <FOO> ); - close(FOO); - if ($firstline =~ m/^# Generated by (install-tl|.*\/tlmgr) on/) { - # rename it - my $nn = "$tmfsysconf/web2c/updmap.cfg.DISABLED"; - if (-r $nn) { - my $fh; - ($fh, $nn) = File::Temp::tempfile( - "updmap.cfg.DISABLED.XXXXXX", DIR => "$tmfsysconf/web2c"); - } - print "Renaming old config file from - $tmfsysconf/web2c/updmap.cfg + my $oldupd = "$tmfsysconf/web2c/updmap.cfg"; + return unless -r $oldupd; # if no such file, good. + + open (OLDUPD, "<$oldupd") || die "open($oldupd) failed: $!"; + chomp( my $firstline = <OLDUPD> ); + close(OLDUPD); + # + if ($firstline =~ m/^# Generated by (install-tl|.*\/tlmgr) on/) { + # assume it was our doing, rename it. + my $nn = "$oldupd.DISABLED"; + if (-r $nn) { + my $fh; + ($fh, $nn) = File::Temp::tempfile( + "updmap.cfg.DISABLED.XXXXXX", DIR => "$tmfsysconf/web2c"); + } + print "Renaming old config file from + $oldupd to - $nn\n"; - if (rename("$tmfsysconf/web2c/updmap.cfg", $nn)) { - if (system("mktexlsr",$tmfsysconf) != 0) { - die "mktexlsr failed after updmap.cfg rename, fix fix fix: $!"; - } - } else { - print STDERR " -Renaming did not succeed, note that - $tmfsysconf/web2c/updmap.cfg -should not be used anymore! -Please see the documentation for updmap. + $nn "; + if (rename($oldupd, $nn)) { + if (system("mktexlsr", $tmfsysconf) != 0) { + die "mktexlsr $tmfsysconf failed after updmap.cfg rename, fix fix: $!"; } + print "No further action should be necessary.\n"; } else { - print STDERR "Config file $tmfsysconf/web2c/updmap.cfg. -This config file should not be used anymore, please read the documentation -of updmap. + print STDERR " +Renaming of + $oldupd +did not succeed. This config file should not be used anymore, +so please do what's necessary to eliminate it. +See the documentation for updmap. "; } + + } else { # first line did not match + print STDERR "Apparently + $oldupd +was created by hand. This config file should not be used anymore, +so please do what's necessary to eliminate it. +See the documentation for updmap. +"; } - # we don't do any error reporting here, what could we do? } sub check_updmap_config_value { |