From 677388a3c8652b310f83074efd620cc0a052ed4a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 13 May 2012 03:53:19 +0000 Subject: multi updmap integration, we have now separate updmap.cfg files git-svn-id: svn://tug.org/texlive/trunk@26320 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLUtils.pm | 67 +++-------------------------------------- 1 file changed, 5 insertions(+), 62 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLUtils.pm') diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index a385b6b2d62..12e7c8a4ce2 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -2681,67 +2681,10 @@ sub create_fmtutil { } sub create_updmap { - my ($tlpdb,$dest,$localconf) = @_; - my @tlpdblines = $tlpdb->updmap_cfg_lines( - get_disabled_local_configs($localconf, '#')); - # we do not use _create_config_files here because we want to - # parse the $localconf file for the five options in updmap.cfg - #_create_config_files($tlpdb, "texmf/web2c/updmap-hdr.cfg", $dest, - # $localconf, 0, '#', \@tlpdblines); - my $headfile = "texmf/web2c/updmap-hdr.cfg"; - my $root = $tlpdb->root; - my @lines; - my @localconflines; - my %configs; - if (-r "$localconf") { - # - # this should be done more intelligently, but for now only add those - # lines without any duplication check ... - open FOO, "<$localconf" - or die "strange, -r ok but cannot open $localconf: $!"; - my @bla = ; - close(FOO); - for my $l (@bla) { - my ($k, $v, @rest) = split(' ', $l); - if (check_updmap_config_value($k, $v, $localconf)) { - $configs{$k} = $v; - } else { - push @localconflines, $l; - } - } - } - # - # read the -hdr file and replace the options if given in the local - # config file - open(INFILE,"<$root/$headfile") or die("Cannot open $root/$headfile"); - for my $l () { - my ($k, $v, @rest) = split(' ', $l); - if (check_updmap_config_value($k, $v, "$root/$headfile")) { - if (defined($configs{$k})) { - push @lines, "$k $configs{$k}\n"; - } else { - push @lines, $l; - } - } else { - push @lines, $l; - } - } - close (INFILE); - - # add the lines from the tlpdb - push @lines, @tlpdblines; - - # add additional local config lines - push @lines, @localconflines; - - if ($#lines >= 0) { - open(OUTFILE,">$dest") - or die("Cannot open $dest for writing: $!"); - - printf OUTFILE "# Generated by %s on %s\n", "$0", scalar localtime; - print OUTFILE @lines; - close(OUTFILE) || warn "close(>$dest) failed: $!"; - } + my ($tlpdb,$dest) = @_; + my @tlpdblines = $tlpdb->updmap_cfg_lines(); + _create_config_files($tlpdb, "texmf/web2c/updmap-hdr.cfg", $dest, + undef, 0, '#', \@tlpdblines); } sub check_updmap_config_value { @@ -2809,7 +2752,7 @@ sub _create_config_files { my @lines = ; push @lines, @$tlpdblinesref; close (INFILE); - if (-r "$localconf") { + if (defined($localconf) && -r $localconf) { # # this should be done more intelligently, but for now only add those # lines without any duplication check ... -- cgit v1.2.3