summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-08-15 22:39:10 +0000
committerKarl Berry <karl@freefriends.org>2013-08-15 22:39:10 +0000
commit5ea866c98c62f3b65c6cf9f6ba050cb9b5c8620b (patch)
treea26b06617ed61e616b526a9523fb32f480bf44ea /Master/texmf-dist/scripts
parent816a0af11a279e2c61f6a49a700cf0f3762945d0 (diff)
check for mismatch between updated vs. active files; warning first time running updmap; doc tweaks
git-svn-id: svn://tug.org/texlive/trunk@31440 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/updmap.pl111
1 files changed, 98 insertions, 13 deletions
diff --git a/Master/texmf-dist/scripts/texlive/updmap.pl b/Master/texmf-dist/scripts/texlive/updmap.pl
index 2e2f40c0e6b..83e6b4db921 100755
--- a/Master/texmf-dist/scripts/texlive/updmap.pl
+++ b/Master/texmf-dist/scripts/texlive/updmap.pl
@@ -1059,6 +1059,7 @@ sub mkMaps {
print_and_log (sprintf(" [%3d files]\n\n", scalar @notmixedmaps));
only_log("\n");
+ my $first_time_creation_in_usermode = 0;
# Create psfonts_t1.map, psfonts_pk.map, ps2pk.map and pdftex.map:
my $dvipsoutputdir = $opts{'dvipsoutputdir'};
my $pdftexoutputdir = $opts{'pdftexoutputdir'};
@@ -1076,6 +1077,9 @@ sub mkMaps {
push @managed_files, "$pxdvioutputdir/xdvi-ptex.map"
if ($pxdviUse eq "true");
for my $file (@managed_files) {
+ if (!$opts{'sys'} && ! -r $file) {
+ $first_time_creation_in_usermode = 1;
+ }
open FILE, ">$file";
print FILE "% $file:\
% maintained by updmap[-sys] (multi).\
@@ -1214,25 +1218,49 @@ sub mkMaps {
}
}
+ sub check_mismatch {
+ my ($mm, $d, $f, $prog) = @_;
+ chomp (my $kpsefound = `kpsewhich --progname=$prog $f`);
+ if (lc("$d/$f") ne lc($kpsefound)) {
+ $mm->{$f} = $kpsefound;
+ }
+ }
+
+ my %mismatch;
my $d;
$d = "$dvipsoutputdir";
print_and_log(" $d:\n");
foreach my $f ('builtin35.map', 'download35.map', 'psfonts_pk.map',
'psfonts_t1.map', 'ps2pk.map', 'psfonts.map') {
dir ($d, $f, 'psfonts.map');
- $updLSR->{add}("$d/$f") unless $opts{'dry-run'};
+ if (!$opts{'dry-run'}) {
+ $updLSR->{add}("$d/$f");
+ $updLSR->{exec}();
+ $updLSR->{reset}();
+ check_mismatch(\%mismatch, $d, $f, "dvips");
+ }
}
$d = "$pdftexoutputdir";
print_and_log(" $d:\n");
foreach my $f ('pdftex_dl14.map', 'pdftex_ndl14.map', 'pdftex.map') {
dir ($d, $f, 'pdftex.map');
- $updLSR->{add}("$d/$f") unless $opts{'dry-run'};
+ if (!$opts{'dry-run'}) {
+ $updLSR->{add}("$d/$f");
+ $updLSR->{exec}();
+ $updLSR->{reset}();
+ check_mismatch(\%mismatch, $d, $f, "pdftex");
+ }
}
$d="$dvipdfmxoutputdir";
print_and_log(" $d:\n");
foreach my $f ('kanjix.map') {
dir ($d, $f, '');
- $updLSR->{add}("$d/$f") unless $opts{'dry-run'};
+ if (!$opts{'dry-run'}) {
+ $updLSR->{add}("$d/$f");
+ $updLSR->{exec}();
+ $updLSR->{reset}();
+ check_mismatch(\%mismatch, $d, $f, "dvipdfmx");
+ }
}
if ($pxdviUse eq "true") {
$d="$pxdvioutputdir";
@@ -1240,8 +1268,59 @@ sub mkMaps {
foreach my $f ('xdvi-ptex.map') {
dir ($d, $f, '');
$updLSR->{add}("$d/$f") unless $opts{'dry-run'};
+ if (!$opts{'dry-run'}) {
+ $updLSR->{add}("$d/$f");
+ $updLSR->{exec}();
+ $updLSR->{reset}();
+ check_mismatch(\%mismatch, $d, $f, "xdvi");
+ }
}
}
+
+ # all kind of warning messages
+ if ($first_time_creation_in_usermode) {
+ print_and_log("
+WARNING: you are switching to updmap's per-user mappings.
+
+You have run updmap (as opposed to updmap-sys) for the first time; this
+has created configuration files which are local to your personal account.
+
+Any changes in system map files will *not* be automatically reflected in
+your files; furthermore, running updmap-sys will no longer have any
+effect for you. As a consequence, you have to rerun updmap yourself
+after any change in the system directories; for example, if a new font
+package is added.
+
+If you want to undo this, remove the files mentioned above.
+
+(Run $prg --help for full documentation of updmap.)
+");
+ }
+
+ if (keys %mismatch) {
+ print_and_log("
+WARNING: $prg has found mismatched files!
+
+The following files have been generated as listed above,
+but will not be found because overriding files exist, listed below.
+");
+ #
+ if ($prg eq "updmap-sys") {
+ print_and_log ("
+Perhaps you have run updmap in the past, but are running updmap-sys
+now. Once you run updmap the first time, you have to keep using it,
+or else remove the personal configuration files it creates (the ones
+listed below).
+");
+ }
+ #
+ for my $f (sort keys %mismatch) {
+ print_and_log (" $f: $mismatch{$f}\n");
+ }
+ #
+ print_and_log("(Run $prg --help for full documentation of updmap.)\n");
+ }
+
close LOG unless $opts{'dry-run'};
print "\nTranscript written on \"$logfile\".\n" if !$opts{'quiet'};
@@ -2062,9 +2141,8 @@ sub warning {
print STDERR @_;
}
-#
-# help, version etc etc
-#
+
+# help, version.
sub version {
my $ret = sprintf "%s (TeX Live, multi) version %s\n", $prg, $version;
@@ -2084,6 +2162,12 @@ Among other things, these map files are used to determine which fonts
should be used as bitmaps and which as outlines, and to determine which
font files are included in the PDF or PostScript output.
+updmap-sys is intended to affect the system-wide configuration, while
+updmap affects personal configuration files only, overriding the system
+files. As a consequence, once updmap has been run, even a single time,
+running updmap-sys no longer has any effect. (updmap-sys issues a
+warning in this situation.)
+
By default, the TeX filename database (ls-R) is also updated.
Options:
@@ -2099,7 +2183,7 @@ Options:
--force recreate files even if config hasn't changed
--nomkmap do not recreate map files
--nohash do not run texhash
- --sys run in system wide mode (equivalent to updmap-sys)
+ --sys affect system-wide files (equivalent to updmap-sys)
-n, --dry-run only show the configuration, no output
--quiet, --silent reduce verbosity
@@ -2130,19 +2214,20 @@ KanjiMap entries are added to psfonts_t1.map and kanjix.map.
Explanation of the OPTION names for --showoptions, --showoption, --setoption:
- dvipsPreferOutline true|false (default true)
+ dvipsPreferOutline true,false (default true)
Whether dvips uses bitmaps or outlines, when both are available.
- dvipsDownloadBase35 true|false (default true)
+ dvipsDownloadBase35 true,false (default true)
Whether dvips includes the standard 35 PostScript fonts in its output.
- pdftexDownloadBase14 true|false (default true)
+ pdftexDownloadBase14 true,false (default true)
Whether pdftex includes the standard 14 PDF fonts in its output.
- pxdviUse true|false (default false)
+ pxdviUse true,false (default false)
Whether maps for pxdvi (Japanese-patched xdvi) are under updmap's control.
kanjiEmbed (any string)
kanjiVariant (any string)
See below.
- LW35 URWkb|URW|ADOBEkb|ADOBE (default URWkb)
+ LW35 URWkb,URW,ADOBEkb,ADOBE (default URWkb)
Adapt the font and file names of the standard 35 PostScript fonts.
+
URWkb URW fonts with "berry" filenames (e.g. uhvbo8ac.pfb)
URW URW fonts with "vendor" filenames (e.g. n019064l.pfb)
ADOBEkb Adobe fonts with "berry" filenames (e.g. phvbo8an.pfb)
@@ -2257,7 +2342,7 @@ Explanation of trees and files normally used:
For step-by-step instructions on making new fonts known to TeX, read
http://tug.org/fonts/fontinstall.html. For even more terse
-instructions, read the beginning of updmap.cfg.
+instructions, read the beginning of the main updmap.cfg.
Report bugs to: tex-k\@tug.org
TeX Live home page: <http://tug.org/texlive/>