[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#898994: texinfo: Unescaped left brace in regex is deprecated, FTBFS with Perl 5.27/5.28



Package: texinfo
Version: 6.5.0.dfsg.1-2
Tags: patch
User: debian-perl@lists.debian.org
Usertags: perl-5.28-transition hh2018

In our first test rebuilds for the upcoming Perl 5.28, we noticed that
this package fails to build under Perl 5.27.11 (unfortunately not quite
yet in Debian experimental) because of a new deprecation message that
is not on the expected output list of the test suite.

The attached patch fixes this while keeping the package building
on current sid. Please consider applying it as that would unblock
further early testing of reverse build dependencies of texinfo.

A failed build log is at

  http://perl.debian.net/rebuild-logs/perl-5.27/texinfo_6.5.0.dfsg.1-2/texinfo_6.5.0.dfsg.1-2+b2_amd64-2018-05-17T19:53:07Z.build

and the unexpected message in test output is

  Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/^\s+@([[:alnum:]][[:alnum:]\-]*)({ <-- HERE })?\s*/ at ../../tp/Texinfo/Parser.pm line 5481.

Thanks for your work on Debian, and greetings from the Debian Perl sprint
in Hamburg!
-- 
Niko Tyni   ntyni@debian.org
>From 1f27900352e04ff4f19bec1c1e9635adad2be31c Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Fri, 18 May 2018 10:40:00 +0100
Subject: [PATCH] Fix unescaped left braces in regexps, deprecated since Perl
 5.27.8

This fixes test failures on recent Perl versions.
---
 tp/Texinfo/Parser.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tp/Texinfo/Parser.pm b/tp/Texinfo/Parser.pm
index dc32ca2..c577aa9 100644
--- a/tp/Texinfo/Parser.pm
+++ b/tp/Texinfo/Parser.pm
@@ -5478,11 +5478,11 @@ sub _parse_special_misc_command($$$$)
     }
   } elsif ($command eq 'clickstyle') {
     # REMACRO
-    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) {
+    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*/) {
       $args = ['@'.$1];
       $self->{'clickstyle'} = $1;
       $remaining = $line;
-      $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
+      $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
       $has_comment = 1 if (defined($4));
     } else {
       $self->line_error (sprintf($self->__(
-- 
2.17.0


Reply to: