Accepting request 918048 from home:darix:apps
- backport a69b48eda3
.patch
this works around a memory leak in perl
https://github.com/Perl/perl5/issues/18604
https://github.com/mquinson/po4a/issues/317
https://github.com/mquinson/po4a/issues/302
OBS-URL: https://build.opensuse.org/request/show/918048
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/po4a?expand=0&rev=72
This commit is contained in:
parent
df9565482f
commit
158253ca65
29
a69b48eda3ebd66eec30a34a377c7a00c6f8e36c.patch
Normal file
29
a69b48eda3ebd66eec30a34a377c7a00c6f8e36c.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From a69b48eda3ebd66eec30a34a377c7a00c6f8e36c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
|
||||
Date: Thu, 20 May 2021 08:48:25 +0200
|
||||
Subject: [PATCH] Instead of using a regex, use subsbtring matching for flags
|
||||
|
||||
This change mitigates #302 when perl exhibits the bug
|
||||
https://github.com/Perl/perl5/issues/18604
|
||||
|
||||
and seems to speed up flag matching.
|
||||
|
||||
fix #302
|
||||
---
|
||||
NEWS | 1 +
|
||||
lib/Locale/Po4a/Po.pm | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/Locale/Po4a/Po.pm b/lib/Locale/Po4a/Po.pm
|
||||
index 5127bf6ea..16c0689fe 100644
|
||||
--- a/lib/Locale/Po4a/Po.pm
|
||||
+++ b/lib/Locale/Po4a/Po.pm
|
||||
@@ -1467,7 +1467,7 @@ sub push_raw {
|
||||
$flags = " $flags ";
|
||||
$flags =~ s/,/ /g;
|
||||
foreach my $flag (@known_flags) {
|
||||
- if ( $flags =~ /\s$flag\s/ ) { # if flag to be set
|
||||
+ if (index($flags, " $flag ") != -1) { # if flag to be set
|
||||
unless ( defined( $self->{po}{$msgid}{'flags'} )
|
||||
&& $self->{po}{$msgid}{'flags'} =~ /\b$flag\b/ )
|
||||
{
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 20:17:45 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- backport https://github.com/mquinson/po4a/commit/a69b48eda3ebd66eec30a34a377c7a00c6f8e36c.patch
|
||||
this works around a memory leak in perl
|
||||
https://github.com/Perl/perl5/issues/18604
|
||||
https://github.com/mquinson/po4a/issues/317
|
||||
https://github.com/mquinson/po4a/issues/302
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 10 00:41:40 UTC 2021 - Pau Garcia Quiles <pau.garcia@suse.com>
|
||||
|
||||
|
@ -28,6 +28,7 @@ Group: Development/Tools/Other
|
||||
%endif
|
||||
URL: https://po4a.org/
|
||||
Source: https://github.com/mquinson/po4a/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: https://github.com/mquinson/po4a/commit/a69b48eda3ebd66eec30a34a377c7a00c6f8e36c.patch
|
||||
|
||||
%if "%{_vendor}" == "debbuild"
|
||||
BuildRequires: deb-perl-macros
|
||||
@ -107,6 +108,7 @@ po4a supports currently the following formats:
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
perl Build.PL installdirs=vendor
|
||||
|
Loading…
x
Reference in New Issue
Block a user