diff options
Diffstat (limited to 'Build/source/texk/tests/TeXLive/TLUtils.pm')
-rw-r--r-- | Build/source/texk/tests/TeXLive/TLUtils.pm | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm index 7d3a7fcf6ec..5b9a6355623 100644 --- a/Build/source/texk/tests/TeXLive/TLUtils.pm +++ b/Build/source/texk/tests/TeXLive/TLUtils.pm @@ -5,7 +5,7 @@ package TeXLive::TLUtils; -my $svnrev = '$Revision: 26663 $'; +my $svnrev = '$Revision: 27031 $'; my $_modulerevision; if ($svnrev =~ m/: ([0-9]+) /) { $_modulerevision = $1; @@ -113,9 +113,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 ); @@ -267,7 +269,7 @@ sub platform_name { my $OS; # O/S type as reported by config.guess. ($CPU = $guessed_platform) =~ s/(.*?)-.*/$1/; $CPU =~ s/^alpha(.*)/alpha/; # alphaev whatever - $CPU =~ s/armv7l/armel/; # arm whatever + $CPU =~ s/armv\dl/armel/; # arm whatever $CPU =~ s/powerpc64/powerpc/; # don't distinguish ppc64 $CPU =~ s/sparc64/sparc/; # don't distinguish sparc64 $CPU =~ s/mips64el/mipsel/; # don't distinguish mips64 and 32 el @@ -2677,11 +2679,59 @@ sub create_fmtutil { sub create_updmap { my ($tlpdb,$dest) = @_; + check_for_old_updmap_cfg(); my @tlpdblines = $tlpdb->updmap_cfg_lines(); _create_config_files($tlpdb, "texmf/web2c/updmap-hdr.cfg", $dest, undef, 0, '#', \@tlpdblines); } +sub check_for_old_updmap_cfg { + chomp( my $tmfsysconf = `kpsewhich -var-value=TEXMFSYSCONFIG` ) ; + 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 +"; + 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 " +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. +"; + } +} + sub check_updmap_config_value { my ($k, $v, $f) = @_; return 0 if !defined($k); |