Bug#870234: arename: Fix for perl 5.26 compatibility
Steve Langasek
steve.langasek at canonical.com
Mon Jul 31 05:46:50 UTC 2017
Package: arename
Version: 4.0-3
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu artful ubuntu-patch autopkgtest
Hi Greg,
As seen at <https://ci.debian.net/packages/a/arename/unstable/amd64/>,
arename's autopkgtests fail against perl 5.26 because this package is using
deprecated syntax.
Upstream has already fixed this issue in their git tree. Attached please
find a cherry-pick of the upstream fix, allowing the autopkgtests to pass.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
diff -Nru arename-4.0/debian/patches/0001-Silence-Unescaped-left-brace-in-regex-warning.patch arename-4.0/debian/patches/0001-Silence-Unescaped-left-brace-in-regex-warning.patch
--- arename-4.0/debian/patches/0001-Silence-Unescaped-left-brace-in-regex-warning.patch 1969-12-31 16:00:00.000000000 -0800
+++ arename-4.0/debian/patches/0001-Silence-Unescaped-left-brace-in-regex-warning.patch 2017-07-30 22:37:16.000000000 -0700
@@ -0,0 +1,54 @@
+From ad2e74cd77ed75d6a8c84013f9fa8ffd512bbaa0 Mon Sep 17 00:00:00 2001
+From: Frank Terbeck <ft at bewatermyfriend.org>
+Date: Tue, 5 Jan 2016 14:37:26 +0100
+Subject: [PATCH] Silence "Unescaped left brace in regex" warning
+
+Using [\] character class to do it. Passes the test suite.
+
+Signed-off-by: Frank Terbeck <ft at bewatermyfriend.org>
+---
+ ARename.pm.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/ARename.pm.in b/ARename.pm.in
+index 6b50263..9d1a676 100644
+--- a/ARename.pm.in
++++ b/ARename.pm.in
+@@ -958,7 +958,7 @@ sub __tokenize_template {
+ # Now for stuff we can read at once:
+
+ # The complex and simple sized expression types.
+- } elsif (!$nest && ($in =~ m/\G\&{([\d\w]+\[\d+\])}/gc ||
++ } elsif (!$nest && ($in =~ m/\G\&[{]([\d\w]+\[\d+\])[}]/gc ||
+ $in =~ m/\G\&([\d\w]+\[\d+\])/gc))
+ {
+ my ($match, $more) = ($1, $EMPTY);
+@@ -972,7 +972,7 @@ sub __tokenize_template {
+ $buf = $EMPTY;
+
+ # The trivial expression (the complex-looking one and the real deal).
+- } elsif (!$nest && ($in =~ m/\G\&{([\d\w]+)}/gc ||
++ } elsif (!$nest && ($in =~ m/\G\&[{]([\d\w]+)[}]/gc ||
+ $in =~ m/\G\&([\d\w]+)/gc))
+ {
+ push @{ $out }, [ 'LITERAL', $buf ] if ($buf ne $EMPTY);
+@@ -983,14 +983,14 @@ sub __tokenize_template {
+ # here on out needs to be copied literally until the matching
+ # "}" is found. That is why the token-handling above looks
+ # at `$nest', too.
+- } elsif (!$nest && $in =~ m/\G\&{/gc) {
++ } elsif (!$nest && $in =~ m/\G\&[{]/gc) {
+ $nest++;
+ push @{ $out }, [ 'LITERAL', $buf ] if ($buf ne $EMPTY);
+ $buf = $EMPTY;
+
+ # When we're looking at a nested expression already, we need
+ # to read the "&{" literally.
+- } elsif ($nest && $in =~ m/\G\&{/gc) {
++ } elsif ($nest && $in =~ m/\G\&[{]/gc) {
+ $nest++;
+ $buf .= q<&{>;
+ $cplxbuf .= q<&{>;
+--
+2.11.0
+
diff -Nru arename-4.0/debian/patches/series arename-4.0/debian/patches/series
--- arename-4.0/debian/patches/series 2015-05-23 10:59:59.000000000 -0700
+++ arename-4.0/debian/patches/series 2017-07-30 22:37:53.000000000 -0700
@@ -4,3 +4,4 @@
cope-with-slashes-in-tag-names.patch
dont-ignore-gen-script-failures.patch
possible-precedence-issue-with-control-flow-operator.patch
+0001-Silence-Unescaped-left-brace-in-regex-warning.patch
More information about the pkg-perl-maintainers
mailing list