Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Test-CleanNamespaces/
Date: Tue, 02 Aug 2016 22:15:20
Message-Id: 1470176075.1e16f7f70a224731b1b7bc53bb47b8ab1da211e9.kentnl@gentoo
1 commit: 1e16f7f70a224731b1b7bc53bb47b8ab1da211e9
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 2 21:51:05 2016 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 2 22:14:35 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e16f7f7
7
8 dev-perl/Test-CleanNamespaces: Weaken dependency on dev-perl/Test-Tester
9
10 Without this fix, Test-CleanNamespaces effectively needs perl-5.22
11 stabilized in order to satisfy Test-Tester from Perl-5.22
12
13 However, satisfying Test-Tester from a mechanism other than Perl-5.22
14 confuses portages dependency resolver, and confuses portage to not be able
15 to upgrade perl, and not being able to upgrade perl means perl can't be
16 stabilized, invoking a stabilization-needs-stabilization bug.
17
18 Hence, the choice here optimises for assuming stabilization will
19 happen/has happened, and removes any dependency on Test::Tester, assuming
20 portage will eventually provide it for you.
21
22 And just to be sure, we use perl before the test phase executes
23 to determine if Test::Tester was /actually/ installed and then only run tests
24 if it was.
25
26 This means before stabilization, some people *might* install this and not have
27 tests run, but everyone *will* get tests working after stabilization, as
28 opposed to the opposite occurring and stabilization being blocked.
29
30 Bug: https://bugs.gentoo.org/584238
31
32 Package-Manager: portage-2.3.0
33 RepoMan-Options: --include-arches="alpha amd64 amd64-fbsd arm arm64 hppa ia64 m68k mips nios2 ppc ppc64 riscv s390 sh sparc sparc-fbsd x86 x86-fbsd"
34
35 .../Test-CleanNamespaces-0.180.0.ebuild | 14 ++++++++++++--
36 1 file changed, 12 insertions(+), 2 deletions(-)
37
38 diff --git a/dev-perl/Test-CleanNamespaces/Test-CleanNamespaces-0.180.0.ebuild b/dev-perl/Test-CleanNamespaces/Test-CleanNamespaces-0.180.0.ebuild
39 index 9341e56..fcb229a 100644
40 --- a/dev-perl/Test-CleanNamespaces/Test-CleanNamespaces-0.180.0.ebuild
41 +++ b/dev-perl/Test-CleanNamespaces/Test-CleanNamespaces-0.180.0.ebuild
42 @@ -1,4 +1,4 @@
43 -# Copyright 1999-2015 Gentoo Foundation
44 +# Copyright 1999-2016 Gentoo Foundation
45 # Distributed under the terms of the GNU General Public License v2
46 # $Id$
47
48 @@ -43,7 +43,6 @@ DEPEND="${RDEPEND}
49 dev-perl/Test-Deep
50 >=virtual/perl-Test-Simple-0.880.0
51 dev-perl/Test-Requires
52 - || ( >=virtual/perl-Test-Simple-1.1.14 dev-perl/Test-Tester )
53 >=dev-perl/Test-Warnings-0.9.0
54 virtual/perl-if
55 virtual/perl-parent
56 @@ -51,3 +50,14 @@ DEPEND="${RDEPEND}
57 "
58
59 SRC_TEST="do parallel"
60 +
61 +src_test() {
62 + # Bug 584238 Avoidance
63 + if perl -e 'exit ( eval { require Test::Tester; 1 } ? 0 : 1 )'; then
64 + perl-module_src_test
65 + else
66 + einfo "Test phase skipped: Test::Tester required for tests"
67 + einfo "Please upgrade to >=dev-lang/perl-5.22.0 or >=virtual/perl-Test-Simple-1.1.10"
68 + einfo "if you want this tested"
69 + fi
70 +}