bug#22372: [PATCH] automake.in: fix deprecated regex syntax

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#22372: [PATCH] automake.in: fix deprecated regex syntax

Enrico Jorns
Running automake with perl >= 5.22.0 produces the warning

  Unescaped left brace in regex is deprecated, passed through in regex;
  marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at
  /ptx/work/dude/ejo/temptest/nodistro.0/sysroots/x86_64-oesdk-linux/usr/bin/automake
  line 3936.

With perl-5.22.0 using a literal '{' in regexp is deprecated and should
be escaped.
This patch escapes the '{' characters to match in the regex of function
`substitute_ac_subst_variables_worker`.

Signed-off-by: Enrico Jorns <[hidden email]>
---
 bin/automake.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/automake.in b/bin/automake.in
index c1d1a8a..2a690e6 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -3741,7 +3741,7 @@ sub substitute_ac_subst_variables_worker
 sub substitute_ac_subst_variables
 {
   my ($text) = @_;
-  $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+  $text =~ s/\$\{([^ \t=:+{}]+)\}/substitute_ac_subst_variables_worker ($1)/ge;
   return $text;
 }
 
--
2.6.4




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#22372: [PATCH] automake.in: fix deprecated regex syntax

Ludovic Courtès-3
Enrico Jorns <[hidden email]> skribis:

> Running automake with perl >= 5.22.0 produces the warning
>
>   Unescaped left brace in regex is deprecated, passed through in regex;
>   marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at
>   /ptx/work/dude/ejo/temptest/nodistro.0/sysroots/x86_64-oesdk-linux/usr/bin/automake
>   line 3936.
>
> With perl-5.22.0 using a literal '{' in regexp is deprecated and should
> be escaped.
> This patch escapes the '{' characters to match in the regex of function
> `substitute_ac_subst_variables_worker`.

I confirm that this solves the problem.

This had previously been reported at
<https://lists.gnu.org/archive/html/automake-patches/2015-07/msg00000.html>.
I think it would be nice to apply it and put up a 1.15.1 release because
more and more people will hit this issue.

WDYT?

Ludo’.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#22372: [PATCH] automake.in: fix deprecated regex syntax

Mathieu Lirzin
Hello,

[hidden email] (Ludovic Courtès) writes:

> Enrico Jorns <[hidden email]> skribis:
>
>> Running automake with perl >= 5.22.0 produces the warning
>>
>>   Unescaped left brace in regex is deprecated, passed through in regex;
>>   marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at
>>   /ptx/work/dude/ejo/temptest/nodistro.0/sysroots/x86_64-oesdk-linux/usr/bin/automake
>>   line 3936.
>>
>> With perl-5.22.0 using a literal '{' in regexp is deprecated and should
>> be escaped.
>> This patch escapes the '{' characters to match in the regex of function
>> `substitute_ac_subst_variables_worker`.
>
> I confirm that this solves the problem.
>
> This had previously been reported at
> <https://lists.gnu.org/archive/html/automake-patches/2015-07/msg00000.html>.
> I think it would be nice to apply it and put up a 1.15.1 release because
> more and more people will hit this issue.

This has been fixed in Automake 1.15.1.  I am closing this bug.

Thanks.

--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37



Loading...