[tlbuild] kpsewhich problem [Cygwin]

Angelo Graziosi angelo.graziosi at alice.it
Fri Dec 18 17:01:00 CET 2009


Il 18/12/2009 0.08, Karl Berry ha scritto:
>      So, I guess that something, changed between 20091205 and this morning,
>      causes this regression. In the Changelog, I see, for example,
>
> It could equally as well be something changed in the rest of the tree.
> Can you get more verbose output from updmap-sys?
> Can you run kpsewhich under a debugger and see what it's doing?

I have tried to revert the code of kpsewhich.c and reverting _only_ 
these changes:

===========================
$ cat /tmp/kpsewhich.c-02.patch
--- kpsewhich.c.orig    2009-12-15 20:46:12.000000000 +0100
+++ kpsewhich.c 2009-12-18 16:50:44.000000000 +0100
@@ -159,8 +159,24 @@

        if (found)
          break;
+
+      /* Some trickery here: the extensions for kpse_fmt_format can
+       * clash with other extensions in use, and we prefer for those
+       * others to be preferred.  And we don't want to change the
+       * integer value of kpse_fmt_format.  So skip it when first
+       * enountered, then use it when we've done everything else,
+       * and use it as the end-guard.
+       */
+      if (f == kpse_fmt_format) {
+        f = kpse_last_format;
+      } else if (++f == kpse_fmt_format) {
+        f++;
+      } else if (f == kpse_last_format) {
+        f = kpse_fmt_format;
+      }
      }

+    /* If there was a match, f will be one past the correct value.  */
      ret = f;
    }
===========================

to the current kpsewhich.c source fixes the problem on Cygwin.


Ciao,
Angelo.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kpsewhich.c-02.patch
URL: <http://tug.org/pipermail/tlbuild/attachments/20091218/8a0e2fd3/attachment.pl>


More information about the tlbuild mailing list