intltool-update fails with Perl 5.26 44/201144/1 accepted/tizen_5.5_base accepted/tizen_5.5_base_mobile_hotfix accepted/tizen_5.5_base_wearable_hotfix accepted/tizen_6.0_base accepted/tizen_6.0_base_tool accepted/tizen_6.0_base_tool_hotfix accepted/tizen_6.5_base accepted/tizen_6.5_base_tool backup/intltool-0.50.2-20211216 tizen_5.5_base tizen_5.5_base_mobile_hotfix tizen_5.5_base_wearable_hotfix tizen_5.5_tv tizen_6.0_base tizen_6.0_base_hotfix tizen_6.5_base accepted/tizen/5.5/base/20191030.081707 accepted/tizen/5.5/base/mobile/hotfix/20201023.084237 accepted/tizen/5.5/base/wearable/hotfix/20201023.080634 accepted/tizen/6.0/base/20201029.110737 accepted/tizen/6.0/base/20230713.142858 accepted/tizen/6.0/base/tool/20201029.112113 accepted/tizen/6.0/base/tool/hotfix/20201030.124927 accepted/tizen/6.0/base/tool/hotfix/20201102.090151 accepted/tizen/6.5/base/20230714.002523 accepted/tizen/6.5/base/tool/20211027.115431 accepted/tizen/base/20190311.013051 submit/tizen_5.5_base/20191030.000001 submit/tizen_5.5_base_mobile_hotfix/20201023.171501 submit/tizen_5.5_base_wearable_hotfix/20201023.155601 submit/tizen_6.0_base/20201029.184801 submit/tizen_6.0_base_hotfix/20201030.192501 submit/tizen_6.0_base_hotfix/20201102.162701 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.200601 submit/tizen_base/20190311.011247 tizen_5.5.m2_release tizen_6.0.m2_release tizen_6.5.m2_release
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 11 Mar 2019 00:52:57 +0000 (09:52 +0900)
committerDonghun Kwak <dh0128.kwak@samsung.com>
Mon, 11 Mar 2019 01:10:34 +0000 (01:10 +0000)
Running intltool-update with Perl 5.26 fails:

"""
Unescaped left brace in regex is illegal here in regex; marked by <--
HERE in m/^(.*)\${ <-- HERE ?([A-Z_]+)}?(.*)$/ at
/home/joerg/Development/buildroot/host/usr/bin/intltool-update line
1065.
"""

Change-Id: I0f7bebb03bd1b11680744387111cba89ff7c5a2a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
(cherry picked from commit a33a53096a19fd452482f14dc17ac1996e4c0a61)

intltool-update.in

index df591c6..049f449 100644 (file)
@@ -1061,7 +1061,7 @@ sub SubstituteVariable
        }
     }
 
-    if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
+    if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
     {
        my $rest = $3;
        my $untouched = $1;
@@ -1189,10 +1189,10 @@ sub FindPackageName
        $name    =~ s/\(+$//g;
        $version =~ s/\(+$//g;
 
-       $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
-       $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
-       $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
-       $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+       $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
+       $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
+       $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
+       $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
     }
 
     if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
@@ -1218,11 +1218,11 @@ sub FindPackageName
        $version =~ s/\(+$//g;
         $bugurl  =~ s/\(+$//g if (defined $bugurl);
 
-       $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
-       $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
-       $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
-       $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
-        $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
+       $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
+       $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
+       $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
+       $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
+        $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
     }
 
     # \s makes this not work, why?