[xml/sgml-pkgs] Bug#554845: linuxdoc-tools: fmt_info.pl should quote regex metacharacters in $texifile

Michael Klein michael.klein at puffin.lb.shuttle.de
Fri Nov 6 21:32:02 UTC 2009


Package: linuxdoc-tools
Version: 0.9.65

Installing linuxdoc-tools on Mac OS X 10.5 fails while building the info docs:

   -------- Building linuxdoc-tools docs ---------
   Installed tree: /tmp/linuxdoc
   Using temporary directory: /var/folders/EA/EAFvc29XFQqO2UsLG6Lzsk+++TE/-Tmp-//ldt.FFdsWGpnGl
   - Building txt docs
   [...]
   - Building info docs
   Processing file ./guide.sgml
   Nested quantifiers in regex; marked by <-- HERE in m//var/folders/EA/EAFvc29XFQqO2UsLG6Lzsk++ <-- HERE +TE/-Tmp-/ldt.FFdsWGpnGl/linuxdoc-tools.f0Q7jOlN7Q/sgmltmp.guide.2.texi/ at /var/folders/EA/EAFvc29XFQqO2UsLG6Lzsk+++TE/-Tmp-//ldt.FFdsWGpnGl/linuxdoc-tools/fmt/fmt_info.pl line 145.
   make: *** [install] Error 2

This is caused by TMPDIR containing the substring "+++":

   fjelljo:/tmp/linuxdoc-tools-0.9.65 > echo $TMPDIR
   /var/folders/EA/EAFvc29XFQqO2UsLG6Lzsk+++TE/-Tmp-/


Suggested fix:

--- lib/fmt/fmt_info.pl.orig	2009-11-06 22:08:04.000000000 +0100
+++ lib/fmt/fmt_info.pl	2009-11-06 22:18:59.000000000 +0100
@@ -142,7 +142,7 @@
    close $TMPINFO;

    # Change to something useful origin filename given by makeinfo
-  $infotext =~ s/$texifile/$fileinfo/;
+  $infotext =~ s/\Q$texifile\E/$fileinfo/;

    # Remove not needed line in resulting info file. Only first match.
    $infotext =~ s/\\input texinfo//;





More information about the debian-xml-sgml-pkgs mailing list