Merge lp:~dobey/intltool/regex-fix into lp:intltool

Proposed by dobey
Status: Needs review
Proposed branch: lp:~dobey/intltool/regex-fix
Merge into: lp:intltool
Diff against target: 44 lines (+10/-10)
1 file modified
intltool-update.in (+10/-10)
To merge this branch: bzr merge lp:~dobey/intltool/regex-fix
Reviewer Review Type Date Requested Status
intltool Developers Pending
Review via email: mp+283202@code.launchpad.net

Commit message

Fix regular expressions to avoid warnings in perl 5.22.

To post a comment you must log in.
Revision history for this message
Phil Wyett (philwyettreb) wrote :

This patch fixes regex issues for building many packages.

The review has now been dormant for over a year. When will it be passed, added to trunk and pushed out as a release?

Revision history for this message
Heiko Becker (heirecka) wrote :

perl-5.26 made the warnings fatal, so getting this patch should probably be more urgent. I noticed another occurrence of an unescaped left brace though when trying to build at-spi2-core in line 1071:

- $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
+ $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\$\{?$2}?/;

Unmerged revisions

748. By Dominique Leuenberger aka DimStar

Fix regular expressions to avoid warnings in perl 5.22.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'intltool-update.in'
2--- intltool-update.in 2014-05-14 02:15:53 +0000
3+++ intltool-update.in 2016-01-19 19:06:54 +0000
4@@ -1062,7 +1062,7 @@
5 }
6 }
7
8- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
9+ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
10 {
11 my $rest = $3;
12 my $untouched = $1;
13@@ -1190,10 +1190,10 @@
14 $name =~ s/\(+$//g;
15 $version =~ s/\(+$//g;
16
17- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
18- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
19- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
20- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
21+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
22+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
23+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
24+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
25 }
26
27 if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
28@@ -1219,11 +1219,11 @@
29 $version =~ s/\(+$//g;
30 $bugurl =~ s/\(+$//g if (defined $bugurl);
31
32- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
33- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
34- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
35- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
36- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
37+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
38+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
39+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
40+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
41+ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
42 }
43
44 # \s makes this not work, why?

Subscribers

People subscribed via source and target branches

to all changes: