[tex-k] texLive 2011 updmap problem

Norbert Preining preining at logic.at
Sat Sep 3 13:46:24 CEST 2011


On Fr, 02 Sep 2011, Karl Berry wrote:
>     Is there no way we can't make that script compatible with older perls?

Yes, there is, I just programmed around it.

Reinhard, or anyone else, could you please test the following patch,
preferrably on both Windows and Unix machines:

Index: updmap.pl
===================================================================
--- updmap.pl	(revision 23775)
+++ updmap.pl	(working copy)
@@ -200,6 +200,20 @@
 #   process cmd line options
 #
 sub processOptions {
+  my $oldconfig = Getopt::Long::Configure(qw(pass_through));
+  sub read_set_options {
+    my ($opt, $val) = @_;
+    # check if = occurs in $val, if not, get the next argument
+    if ($val =~ m/=/) {
+      push @setoptions, $val;
+    } else {
+      push @setoptions, "$val=" . shift @ARGV;
+    }
+  }
+  GetOptions("setoption=s@" => \&read_set_options) or
+    die "Try \"$0 --help\" for more information.\n";
+  Getopt::Long::Configure($oldconfig);
+
   unless (&GetOptions (
       "cnffile=s" => \$cnfFile,
       "copy" => \$copy,
@@ -217,7 +231,8 @@
       "outputdir=s" => \$outputdir,
       "pdftexoutputdir=s" => \$pdftexoutputdir,
       "q|quiet|silent" => \$quiet,
-      "setoption=s{1,2}" => \@setoptions,
+      # handled above
+      #"setoption=s{1,2}" => \@setoptions,
       "showoptions=s" => \@showoptions,
       "syncwithtrees" => \$syncwithtrees,
       "version" => sub { print &version(); exit(0); },


I need more testing but I think we can get it running for all perls.

Best wishes

Norbert
------------------------------------------------------------------------
Norbert Preining            preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan                                 TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
MOFFAT (n. tailoring term)
That part of your coat which is designed to be sat on by the person
next of you on the bus.
			--- Douglas Adams, The Meaning of Liff


More information about the tex-k mailing list