texlive[51338] Master/texmf-dist/scripts/texlive/updmap.pl:

commits+karl at tug.org commits+karl at tug.org
Fri Jun 7 18:36:59 CEST 2019


Revision: 51338
          http://tug.org/svn/texlive?view=revision&revision=51338
Author:   karl
Date:     2019-06-07 18:36:59 +0200 (Fri, 07 Jun 2019)
Log Message:
-----------
(read_map_files): quotemeta (\Q...\E) the map
name, in case it contains Perl escape sequences,
as in "\Users".

Also, if the map name already begins with a /,
don't check for another one. Although absolute
names are not needed or desirable, no need for
gratuitious failure.

Original report from Keks Dose, 18 Apr 2019 18:22:04.

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texlive/updmap.pl

Modified: trunk/Master/texmf-dist/scripts/texlive/updmap.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/updmap.pl	2019-06-06 23:38:16 UTC (rev 51337)
+++ trunk/Master/texmf-dist/scripts/texlive/updmap.pl	2019-06-07 16:36:59 UTC (rev 51338)
@@ -2075,7 +2075,12 @@
   my @fullpath = `kpsewhich --format=map @maps`;
   chomp @fullpath;
   foreach my $map (@maps) {
-    my ($ff) = grep /\/$map(\.map)?$/, @fullpath;
+    # in case they give an absolute path (not needed/desired, but ...);
+    # Windows not supported.
+    my $dirsep = ($map =~ m!^/!) ? "" : "/";
+    # quotemeta the map string to avoid perl regexp warning, e.g.,
+    # if map name contains "\Users", the "\U" should be literal.
+    my ($ff) = grep /$dirsep\Q$map\E(\.map)?$/, @fullpath;
     if ($ff) {
       $alldata->{'maps'}{$map}{'fullpath'} = $ff;
     } else {



More information about the tex-live-commits mailing list