dev-perl/Dist-Zilla-Plugin-NextVersion-Semantic: -r bump for bug #737308

Patch t/basic.t not to be broken by MAKEOPTS =~ "V=1", which instead of
simply turning on verbosity like in autotools, deeply trips the code
under testing to change the desired "output version", which, when not
guarded, breaks tests that inherently rely on this variable being unset.

Bug: https://bugs.gentoo.org/737308
Bug: https://github.com/yanick/Dist-Zilla-Plugin-NextVersion-Semantic/pull/6
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Kent Fredric <kentnl@gentoo.org>
This commit is contained in:
Kent Fredric
2020-09-19 22:49:53 +12:00
parent 8c7ef5faf2
commit 5ac48a2a6a
2 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DIST_AUTHOR=YANICK
DIST_VERSION=0.2.5
inherit perl-module
DESCRIPTION="update the next version, semantic-wise"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-perl/CPAN-Changes-0.200.0
dev-perl/Dist-Zilla
dev-perl/List-AllUtils
dev-perl/Moose
dev-perl/Perl-Version
virtual/perl-Scalar-List-Utils
"
BDEPEND="${RDEPEND}
virtual/perl-ExtUtils-MakeMaker
test? (
virtual/perl-File-Spec
virtual/perl-IO
dev-perl/Test-Exception
virtual/perl-Test-Simple
)
"
PATCHES=(
"${FILESDIR}/${PN}-0.2.5-no-V-in-test.patch"
)

View File

@@ -0,0 +1,40 @@
From e38c5bfa847361ab251ce533fdd6e8993afbd2f3 Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentnl@gentoo.org>
Date: Sat, 19 Sep 2020 22:13:21 +1200
Subject: t/basic.t: Don't become broken when MAKEOPTS includes V=1
Some people set MAKEOPTS to include V=1, in order to coax autotools
based makefiles into being more verbose.
But when that ENV var is used to direct perl ebuilds for Dzil things,
well, it unintentionally uses "1" as the *next version*, and so breaks
all code that isn't expecting that to happen.
Given its not the job of tests to tell people their system is weird, it
just makes the scope "normal" ( that is, defaulting V to be unset
internally )
Bug: https://bugs.gentoo.org/737308
Bug: https://github.com/yanick/Dist-Zilla-Plugin-NextVersion-Semantic/pull/6
---
t/basic.t | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/t/basic.t b/t/basic.t
index 22d04fe..b2942c8 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -6,6 +6,10 @@ use Test::Exception;
use Test::DZil;
+# V=1 is common in MAKEOPTS for gnu autotools
+# to set "verbose mode"
+delete $ENV{V} if exists $ENV{V};
+
my $changes = make_changes(<<'END_CHANGES');
- got included in an awesome test suite
END_CHANGES
--
2.28.0