diff options
author | Norbert Preining <preining@logic.at> | 2007-12-27 09:21:03 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-12-27 09:21:03 +0000 |
commit | e2f052916f384e5ccbb7cf1341195ed20c1e2e70 (patch) | |
tree | 516c84ca9698d610eafce7a416dfb2f81a7abbd0 /Master/tlpkg | |
parent | a0af54a429e157c99385e3b0f2790f38f5232000 (diff) |
change the calling mode for create_* sligthly
git-svn-id: svn://tug.org/texlive/trunk@5947 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 4e14b054cd0..3780fcc7fb0 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -49,9 +49,9 @@ C<TeXLive::TLUtils> -- Utilities used in the TeX Live Infrastructure Modules TeXLive::TLUtils::additional_architectures_available_from_net; TeXLive::TLUtils::make_var_skeleton($path); TeXLive::TLUtils::make_local_skeleton($path); - TeXLive::TLUtils::create_fmtutil($tlpdb,$texmfsysvar,$texmflocal); - TeXLive::TLUtils::create_updmap($tlpdb,$texmfsysvar,$texmflocal); - TeXLive::TLUtils::create_language($tlpdb,$texmfsysvar,$texmflocal); + TeXLive::TLUtils::create_fmtutil($tlpdb,$dest,$localconf); + TeXLive::TLUtils::create_updmap($tlpdb,$dest,$localconf); + TeXLive::TLUtils::create_language($tlpdb,$dest,$localconf); TeXLive::TLUtils::install_packages($from_tlpdb,$to_tlpdb,@list); TeXLive::TLUtils::install_package($what, $filelistref, $target, $platform); @@ -901,18 +901,17 @@ sub make_local_skeleton { =pod -=item C<create_fmtutil($tlpdb, $texmfsysvar, $texmflocal)> +=item C<create_fmtutil($tlpdb, $dest, $localconf)> -=item C<create_updmap($tlpdb, $texmfsysvar, $texmflocal)> +=item C<create_updmap($tlpdb, $dest, $localconf)> -=item C<create_language($tlpdb, $texmfsysvar, $texmflocal)> +=item C<create_language($tlpdb, $dest, $localconf)> These three functions create fmtutil.cnf, updmap.cfg, and language.dat in -below $texmfsysvar (which should be TEXMFSYSVAR). These functions merge +in $dest (which normally should be somewhere below TEXMFSYSVAR). +These functions merge the information present in the TLPDB $tlpdb (formats, maps, hyphenations) -with local configuration additions: $texmflocal/web2c/fmtutil-local.cnf, -$texmflocal/web2c/updmap-local.cfg, and -$texmflocal/tex/generic/config/language-local.dat. +with local configuration additions: $localconf. Currently the "merging" is done trivially by appending the content of the local configuration files at the end of the file. This could be @@ -921,66 +920,63 @@ improved (checking for duplicates). =cut sub create_fmtutil { - my ($tlpdb,$texmfsysvar,$texmflocalpath) = @_; + my ($tlpdb,$dest,$localconf) = @_; my $root = $tlpdb->root; my @lines = $tlpdb->fmtutil_cnf_lines; - if (-r "$texmflocalpath/web2c/fmtutil-local.cnf") { + if (-r "$localconf") { # # this should be done more intelligently, but for now only add those # lines without any duplication check ... - open FOO, "<$texmflocalpath/web2c/fmtutil-local.cnf" + open FOO, "<$localconf" or die "strange -r but cannot open?\n"; my @tmp = <FOO>; push @lines, @tmp; } if ($#lines >= 0) { - my $fmtutilpath = "$texmfsysvar/web2c/fmtutil.cnf"; - open(OUTFILE,">$fmtutilpath") - or die("Cannot open $fmtutilpath for writing!\n"); + open(OUTFILE,">$dest") + or die("Cannot open $dest for writing!\n"); foreach (@lines) { print OUTFILE; } close(OUTFILE); } } sub create_updmap { - my ($tlpdb,$texmfsysvar,$texmflocalpath) = @_; + my ($tlpdb,$dest,$localconf) = @_; my $root = $tlpdb->root; my @lines = $tlpdb->updmap_cfg_lines; - if (-r "$texmflocalpath/web2c/updmap-local.cfg") { + if (-r "$localconf") { # # this should be done more intelligently, but for now only add those # lines without any duplication check ... - open FOO, "<$texmflocalpath/web2c/updmap-local.cfg" + open FOO, "<$localconf" or die "strange -r but cannot open?\n"; my @tmp = <FOO>; push @lines, @tmp; } if ($#lines >= 0) { - my $updmapcfgpath = "$texmfsysvar/web2c/updmap.cfg"; - open(OUTFILE,">$updmapcfgpath") - or die("Cannot open $updmapcfgpath for writing!\n"); + open(OUTFILE,">$dest") + or die("Cannot open $dest for writing!\n"); foreach (@lines) { print OUTFILE; } close(OUTFILE); } } sub create_language { - my ($tlpdb,$texmfsysvar,$texmflocalpath) = @_; + my ($tlpdb,$dest,$localconf) = @_; my $root = $tlpdb->root; my @lines = $tlpdb->language_dat_lines; - if (-r "$texmflocalpath/tex/generic/config/language-local.dat") { + if (-r "$localconf") { # # this should be done more intelligently, but for now only add those # lines without any duplication check ... - open FOO, "<$texmflocalpath/tex/generic/config/language-local.dat" + open FOO, "<$localconf" or die "strange -r but cannot open?\n"; my @tmp = <FOO>; push @lines, @tmp; } if ($#lines >= 0) { - my $lanpath = "$texmfsysvar/tex/generic/config/language.dat"; - open(OUTFILE,">$lanpath") - or die("Cannot open $lanpath for writing!\n"); + open(OUTFILE,">$dest") + or die("Cannot open $dest for writing!\n"); foreach (@lines) { print OUTFILE; } close(OUTFILE); } |