diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2019-10-21 18:30:02 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2019-10-21 18:30:56 +0200 |
commit | a0b007e3de8dea386bb8666b468140c4ea076937 (patch) | |
tree | b380037eee5dd0b65d2598f6d0181b7d9f9528af /dev-perl | |
parent | dev-perl/Template-Plugin-Latex: Remove old (diff) | |
download | gentoo-a0b007e3de8dea386bb8666b468140c4ea076937.tar.gz gentoo-a0b007e3de8dea386bb8666b468140c4ea076937.tar.bz2 gentoo-a0b007e3de8dea386bb8666b468140c4ea076937.zip |
dev-perl/Parallel-Prefork: Add patch by Slaven Rezic to fix tests
Closes: https://bugs.gentoo.org/664502
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'dev-perl')
-rw-r--r-- | dev-perl/Parallel-Prefork/Parallel-Prefork-0.180.0.ebuild | 4 | ||||
-rw-r--r-- | dev-perl/Parallel-Prefork/files/Parallel-Prefork-0.180.0-RT113449.patch | 40 |
2 files changed, 43 insertions, 1 deletions
diff --git a/dev-perl/Parallel-Prefork/Parallel-Prefork-0.180.0.ebuild b/dev-perl/Parallel-Prefork/Parallel-Prefork-0.180.0.ebuild index d402ddf167da..e337b654056b 100644 --- a/dev-perl/Parallel-Prefork/Parallel-Prefork-0.180.0.ebuild +++ b/dev-perl/Parallel-Prefork/Parallel-Prefork-0.180.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -28,6 +28,8 @@ DEPEND="${RDEPEND} ) " +PATCHES=( "${FILESDIR}/${P}-RT113449.patch" ) + src_prepare() { sed -i -e 's/use inc::Module::Install/use lib q[.]; use inc::Module::Install/' Makefile.PL || die "Can't patch Makefile.PL for 5.26 dot-in-inc" diff --git a/dev-perl/Parallel-Prefork/files/Parallel-Prefork-0.180.0-RT113449.patch b/dev-perl/Parallel-Prefork/files/Parallel-Prefork-0.180.0-RT113449.patch new file mode 100644 index 000000000000..f075600e256e --- /dev/null +++ b/dev-perl/Parallel-Prefork/files/Parallel-Prefork-0.180.0-RT113449.patch @@ -0,0 +1,40 @@ +From 0e51495b41c913ba2474d95ed7668a2190e7bd8e Mon Sep 17 00:00:00 2001 +From: Slaven Rezic <slaven@rezic.de> +Date: Sat, 18 Nov 2017 21:04:26 +0000 +Subject: [PATCH] workaround for race condition in t/01-base.t [RT #113449] + +It's possible that the TERM signal handler is not yet installed +in some workers when the last worker runs and sends the final +TERM signal to the parent. The effect is that the number +stored in the temporary file is not as expected, as in this report: +http://www.cpantesters.org/cpan/report/86348529 + +This failure seems to occur quite frequently on (virtual?) FreeBSD +systems. +--- + t/01-base.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/01-base.t b/t/01-base.t +index 5137791..80e447d 100755 +--- a/t/01-base.t ++++ b/t/01-base.t +@@ -39,7 +39,6 @@ until ($pm->signal_received) { + $c++; + seek $fh, 0, 0; + syswrite $fh, $c, length($c); +- flock $fh, LOCK_UN; + local $SIG{TERM} = sub { + flock $fh, LOCK_EX; + seek $fh, 0, 0; +@@ -50,6 +49,7 @@ until ($pm->signal_received) { + flock $fh, LOCK_UN; + exit 0; + }; ++ flock $fh, LOCK_UN; + if ($c == $pm->max_workers) { + kill 'TERM', $ppid; + } +-- +2.1.2 + |