From 9c0e439e5a92dd81f8125232b68d97de85a19b4a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 22 May 2012 15:53:45 +0000 Subject: consistency git-svn-id: svn://tug.org/texlive/trunk@26568 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/tests/TeXLive/TLUtils.pm | 23 ++-- .../texk/texlive/linked_scripts/texlive/tlmgr.pl | 151 ++++++--------------- Build/source/utils/biber/TeXLive/TLUtils.pm | 23 ++-- 3 files changed, 69 insertions(+), 128 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm index 7f3bda59e6f..e677c4da73e 100644 --- a/Build/source/texk/tests/TeXLive/TLUtils.pm +++ b/Build/source/texk/tests/TeXLive/TLUtils.pm @@ -1,4 +1,3 @@ -# $Id: TLUtils.pm 26320 2012-05-13 03:53:19Z preining $ # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live. # Copyright 2007, 2008, 2009, 2010, 2011 Norbert Preining, Reinhard Kotucha # This file is licensed under the GNU General Public License version 2 @@ -6,7 +5,7 @@ package TeXLive::TLUtils; -my $svnrev = '$Revision: 26320 $'; +my $svnrev = '$Revision: 26541 $'; my $_modulerevision; if ($svnrev =~ m/: ([0-9]+) /) { $_modulerevision = $1; @@ -1575,7 +1574,7 @@ sub _do_postaction_fileassoc { tlwarn("filetype of fileassoc postaction not given\n"); return 0; } - my $filetype = $keyval{'filetype'}; + my $filetype = $keyval{'filetype'}.'.'.$ReleaseYear; &log("postaction $how fileassoc for " . $tlpobj->name . ": $extension, $filetype\n"); @@ -1606,7 +1605,7 @@ sub _do_postaction_filetype { tlwarn("name of filetype postaction not given\n"); return 0; } - my $name = $keyval{'name'}; + my $name = $keyval{'name'}.'.'.$ReleaseYear; # cmd can be an arbitrary string if (!defined($keyval{'cmd'})) { @@ -1656,7 +1655,7 @@ sub _do_postaction_progid { tlwarn("filetype of progid postaction not given\n"); return 0; } - my $filetype = $keyval{'filetype'}; + my $filetype = $keyval{'filetype'}.'.'.$ReleaseYear; &log("postaction $how progid for " . $tlpobj->name . ": $extension, $filetype\n"); @@ -3857,9 +3856,9 @@ sub mktexupd { $files{$file}=1; } }, - # "reset" => sub { - # %files=(); - # }, + "reset" => sub { + %files=(); + }, "mustexist" => sub { $mustexist=shift; }, @@ -3880,12 +3879,14 @@ sub mktexupd { foreach my $path (keys %files) { foreach my $db (@texmfdbs) { $db=substr($db, -1) if ($db=~m|/$|); # strip leading / - if (substr($path, 0, length("$db/")) eq "$db/") { + $db = lc($db) if win32(); + $up = (win32() ? lc($path) : $path); + if (substr($up, 0, length("$db/")) eq "$db/") { # we appended a / because otherwise "texmf" is recognized as a # substring of "texmf-dist". - my $path='./' . substr($path, length("$db/")); + my $np = './' . substr($up, length("$db/")); my ($dir, $file); - $_=$path; + $_=$np; ($dir, $file) = m|(.*)/(.*)|; $dbs{$db}{$dir}{$file}=1; } diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index f7d0e8fd6e3..24f41e5a3bf 100755 --- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl +++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl @@ -1,12 +1,12 @@ #!/usr/bin/env perl -# $Id: tlmgr.pl 26265 2012-05-09 00:15:38Z preining $ +# $Id: tlmgr.pl 26468 2012-05-17 16:07:52Z karl $ # # Copyright 2008, 2009, 2010, 2011, 2012 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. -my $svnrev = '$Revision: 26265 $'; -my $datrev = '$Date: 2012-05-09 02:15:38 +0200 (Wed, 09 May 2012) $'; +my $svnrev = '$Revision: 26468 $'; +my $datrev = '$Date: 2012-05-17 18:07:52 +0200 (Thu, 17 May 2012) $'; my $tlmgrrevision; my $prg; if ($svnrev =~ m/: ([0-9]+) /) { @@ -632,47 +632,21 @@ sub handle_execute_actions chomp(my $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`); chomp(my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`); chomp(my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`); + chomp(my $TEXMFDIST = `kpsewhich -var-value=TEXMFDIST`); # # maps handling - # if enabled and disabled -> do nothing - # if only enabled -> enable it - # 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 $updmap_run_needed = 0; - my %do_enable; - my %do_disable; for my $m (keys %{$::execute_actions{'enable'}{'maps'}}) { $updmap_run_needed = 1; - $do_enable{$m} = 1; } for my $m (keys %{$::execute_actions{'disable'}{'maps'}}) { $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 - delete $do_enable{$m}; - } else { - # not new installed, so simply removed - $do_disable{$m} = 1; - } } - if ($updmap_run_needed && $localtlpdb->option("generate_updmap")) { - my $dest = "$TEXMFSYSCONFIG/web2c/updmap.cfg"; - my $localcfg = "$TEXMFLOCAL/web2c/updmap-local.cfg"; - info("tlmgr: generate_updmap writing new $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); - } + if ($updmap_run_needed) { + my $dest = "$TEXMFDIST/web2c/updmap.cfg"; + TeXLive::TLUtils::create_updmap($localtlpdb, $dest); } $errors += do_cmd_and_check("updmap-sys") if $updmap_run_needed; } @@ -3962,17 +3936,15 @@ sub action_generate { init_local_db(); # we create fmtutil.cnf, language.dat, language.def in TEXMFSYSVAR and - # updmap.cfg in TEXMFSYSCONFIG. The reason is that calls to - # updmap-sys (as is done by the tlmgr update call when packages with - # maps are installed) will create the updmap.cfg file in - # TEXMFSYSCONFIG. It would start from the version in TEXMFSYSVAR, but - # after that the TEXMFSYSCONFIG takes precedence and thus the - # mechanism explained in updmap.cfg header would not work. We don't - # want that. So just use TEXMFSYSCONFIG from the start. + # updmap.cfg in TEXMFDIST. The reason is that we are now using an + # implementation of updmap that supports multiple updmap files. + # Local adaptions should not be made there, but only in TEXMFLOCAL + # or TEXMF(SYS)CONFIG updmap.cfg # chomp (my $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`); chomp (my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`); chomp (my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`); + chomp (my $TEXMFDIST = `kpsewhich -var-value=TEXMFDIST`); # we do generate all config files, treat $opts{"dest"} as pattern # and make it append the respective extensions @@ -4050,10 +4022,9 @@ sub action_generate { } } elsif ($what =~ m/^updmap$/i) { - my $dest = $opts{"dest"} || "$TEXMFSYSCONFIG/web2c/updmap.cfg"; - my $localcfg = $opts{"localcfg"} || "$TEXMFLOCAL/web2c/updmap-local.cfg"; + my $dest = $opts{"dest"} || "$TEXMFDIST/web2c/updmap.cfg"; debug("$prg: writing new updmap.cfg to $dest\n"); - TeXLive::TLUtils::create_updmap($localtlpdb, $dest, $localcfg); + TeXLive::TLUtils::create_updmap($localtlpdb, $dest); if ($opts{"rebuild-sys"}) { do_cmd_and_check("updmap-sys"); @@ -5496,11 +5467,10 @@ sub check_for_critical_updates return(@critical_upd); } -sub critical_updates_warning -{ - tlwarn("Updates for tlmgr itself are present.\n"); +sub critical_updates_warning { tlwarn("=" x 79, "\n"); - tlwarn("Please update the package manager first, via either\n"); + tlwarn("Updates for tlmgr itself are present.\n"); + tlwarn("So, please update the package manager first, via either\n"); tlwarn(" tlmgr update --self\n"); tlwarn("or by getting the latest updater for Unix-ish systems:\n"); tlwarn(" $TeXLiveURL/update-tlmgr-latest.sh\n"); @@ -6179,7 +6149,6 @@ the definitive list): sys_bin (directory to which executables are linked by the path action) sys_man (directory to which man pages are linked by the path action) sys_info (directory to which Info files are linked by the path action) - generate_updmap (run the equivalent of tlmgr generate updmap on changes) desktop_integration (Windows-only: create Start menu shortcuts) fileassocs (Windows-only: change file associations) multiuser (Windows-only: install for all users) @@ -6235,9 +6204,6 @@ The C, C, and C options are used on Unix-like systems to control the generation of links for executables, info files and man pages. See the C action for details. -For the C option, see the C section in -L]... I">. - The last three options control behaviour on Windows installations. If C is set, then some packages will install items in a sub-folder of the Start menu for C, documentation, etc. If @@ -6628,31 +6594,20 @@ Do not ask for confirmation, remove immediately. =back The C action overwrites any manual changes made in the -respective files: it recreates them from scratch. - -For C and the language files, this is normal, and both the TeX -Live installer and C routinely call C for them. - -For C, however, C does I use C by default, -because the result would be to disable all maps which have been manually -installed via S>, e.g., for proprietary or local -fonts, which has been the standard method for adding fonts to TeX -installations for years. Rather, the C action only -incorporates the changes in the C<--localcfg> file mentioned below. - -Notwithstanding the above, if you only use the fonts and font packages -within TeX Live, and rigorously maintain your local fonts (if any) using -C, there is nothing wrong with using C. It can be helpful in moving from release to release, -especially. We use it ourselves to generate the C file in -the live source repository. If you want to commit yourself to using -C, you can set the C option and -C will run C for you on update. - -In any case, C updates and maintains the final C in -C (while the other generated files are in -C), because that is the location that C (via -C) historically uses. +respective files: it recreates them from scratch based on the +information of the installed packages, plus local adaptions. + +The TeX Live installer and C routinely call C for +all of these files. + +For managing your own fonts, please see the documentation of +updmap, which supports multiple updmap.cfg files. So by simply +editing TEXMFLOCAL's updmap.cfg they will be accounted for. + +In any case, C updates and maintains C in +C (while the other generated files are in +C), because that is the location where the fonts +are installed. In more detail: C remakes any of the five config files C, C, C, C, @@ -6660,26 +6615,27 @@ and C from the information present in the local TLPDB, plus locally-maintained files. The locally-maintained files are C, -C, C, C, -or C, searched for in C in the respective -directories. If they are present, the final file is made by starting +C, C, or C, +searched for in C in the respective directories. +The formerly supported C is not supported anymore, +since C now supports multiple updmap.cfg files, so local +additions can be put into an updmap.cfg file in TEXMFLOCAL. +If local additions are present, the final file is made by starting with the main file, omitting any entries that the local file specifies to be disabled, and finally appending the local file. Local files specify entries to be disabled with a comment line, namely one of these: - #!NAME %!NAME --!NAME -where C and C use C<#>, C and +where C uses C<#>, C and C use C<%>, and C use C<-->. In any -case, the I is the respective format name, map file name (include -the C<.map> extension), or hyphenation pattern identifier. Examples: +case, the I is the respective format name, or hyphenation pattern +identifier. Examples: #!pdflatex - #!lm.map %!german --!usenglishmax @@ -6692,20 +6648,9 @@ except for the special disabling lines, the local files follow the same syntax as the master files. The form C recreates both the C, the -C and the Cfiles, while the forms with +C and the C files, while the forms with extension recreates only the given language file. -Special consideration for updmap.cfg: in addition to font map files, -this file specifies the setting of five options: C, -C, C, C, and -C. The defaults for these as set in -C are usually fine. If you want to change them, you can -include changed settings for any or all of these five options in your -C file and they will be respected by C. For example: - - dvipsDownloadBase35 true - Options: =over 4 @@ -6713,7 +6658,7 @@ Options: =item B<--dest> I specifies the output file (defaults to the respective location in -C for C and C, and C +C for C and C, and C for C). If C<--dest> is given to C, it serves as a basename onto which C<.dat> will be appended for the name of the C output file, C<.def> will be @@ -6751,19 +6696,13 @@ The respective locations are as follows: web2c/fmtutil.cnf (and fmtutil-local.cnf); web2c/updmap.cfg (and updmap-local.cfg). -Final repetition: as explained above, C does I use -C for font map files. Therefore, if you want to make -use of C, you must run C -and C yourself after making any local changes. If you -make yourself responsible for rigorously using C), set -C