Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Test-Needs for openSUSE:Factory checked in at 2021-06-05 23:31:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Test-Needs (Old) and /work/SRC/openSUSE:Factory/.perl-Test-Needs.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Needs" Sat Jun 5 23:31:02 2021 rev:5 rq:896696 version:0.002009 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Test-Needs/perl-Test-Needs.changes 2019-04-09 20:16:18.429538480 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Test-Needs.new.1898/perl-Test-Needs.changes 2021-06-05 23:31:31.072436482 +0200 @@ -1,0 +2,21 @@ +Wed May 26 03:07:38 UTC 2021 - Tina M??ller <timueller+p...@suse.de> + +- updated to 0.002009 + see /usr/share/doc/packages/perl-Test-Needs/Changes + + 0.002009 - 2021-05-25 + - fix warnings from Test::Builder if Test::Needs is loaded first, and is + used to check for a Test module. + - fix location in code reported when a module check fails. + - support short forms of perl versions + - support perl versions greater than 5 + - fix handling of v-string versions on perl 5.6 + + 0.002_008 - 2019-07-12 + - fix test compatibility with Windows. + + 0.002_007 - 2019-07-09 + - fix tests when @INC includes directories that shouldn't have their + archname or version subdirectories added. + +------------------------------------------------------------------- Old: ---- Test-Needs-0.002006.tar.gz New: ---- Test-Needs-0.002009.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Test-Needs.spec ++++++ --- /var/tmp/diff_new_pack.wjiJaZ/_old 2021-06-05 23:31:31.520437261 +0200 +++ /var/tmp/diff_new_pack.wjiJaZ/_new 2021-06-05 23:31:31.524437268 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Test-Needs # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,18 +16,16 @@ # +%define cpan_name Test-Needs Name: perl-Test-Needs -Version: 0.002006 +Version: 0.002009 Release: 0 -%define cpan_name Test-Needs Summary: Skip tests when modules not available License: Artistic-1.0 OR GPL-1.0-or-later -Group: Development/Libraries/Perl -Url: https://metacpan.org/release/%{cpan_name} +URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros %{perl_requires} @@ -56,11 +54,11 @@ continue running after that point. %prep -%setup -q -n %{cpan_name}-%{version} +%autosetup -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor -make %{?_smp_mflags} +%make_build %check make test @@ -71,7 +69,6 @@ %perl_gen_filelist %files -f %{name}.files -%defattr(-,root,root,755) %doc Changes README %license LICENSE ++++++ Test-Needs-0.002006.tar.gz -> Test-Needs-0.002009.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/Changes new/Test-Needs-0.002009/Changes --- old/Test-Needs-0.002006/Changes 2019-04-04 22:42:47.000000000 +0200 +++ new/Test-Needs-0.002009/Changes 2021-05-25 08:27:57.000000000 +0200 @@ -1,5 +1,20 @@ Revision history for Test::Needs +0.002009 - 2021-05-25 + - fix warnings from Test::Builder if Test::Needs is loaded first, and is + used to check for a Test module. + - fix location in code reported when a module check fails. + - support short forms of perl versions + - support perl versions greater than 5 + - fix handling of v-string versions on perl 5.6 + +0.002_008 - 2019-07-12 + - fix test compatibility with Windows. + +0.002_007 - 2019-07-09 + - fix tests when @INC includes directories that shouldn't have their + archname or version subdirectories added. + 0.002006 - 2019-04-04 - added additional references to related modules in pod - various internal cleanups diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/LICENSE new/Test-Needs-0.002009/LICENSE --- old/Test-Needs-0.002006/LICENSE 2019-04-04 22:43:10.000000000 +0200 +++ new/Test-Needs-0.002009/LICENSE 2021-05-25 08:28:24.000000000 +0200 @@ -7,7 +7,7 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 2019 by haarg - Graham Knop (cpan:HAARG) <ha...@haarg.org>. +This software is Copyright (c) 2021 by haarg - Graham Knop (cpan:HAARG) <ha...@haarg.org>. This is free software, licensed under: @@ -267,7 +267,7 @@ --- The Artistic License 1.0 --- -This software is Copyright (c) 2019 by haarg - Graham Knop (cpan:HAARG) <ha...@haarg.org>. +This software is Copyright (c) 2021 by haarg - Graham Knop (cpan:HAARG) <ha...@haarg.org>. This is free software, licensed under: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/MANIFEST new/Test-Needs-0.002009/MANIFEST --- old/Test-Needs-0.002006/MANIFEST 2019-04-04 22:43:10.000000000 +0200 +++ new/Test-Needs-0.002009/MANIFEST 2021-05-25 08:28:24.000000000 +0200 @@ -8,6 +8,7 @@ t/lib/BrokenModule.pm t/lib/ModuleWithVersion.pm t/lib/TestScript.pm +t/numify_version.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) README README file (added by Distar) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/META.json new/Test-Needs-0.002009/META.json --- old/Test-Needs-0.002006/META.json 2019-04-04 22:43:09.000000000 +0200 +++ new/Test-Needs-0.002009/META.json 2021-05-25 08:28:23.000000000 +0200 @@ -4,7 +4,7 @@ "haarg - Graham Knop (cpan:HAARG) <ha...@haarg.org>" ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.60, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -56,11 +56,11 @@ }, "x_IRC" : "irc://irc.perl.org/#perl-qa" }, - "version" : "0.002006", + "version" : "0.002009", "x_cpants" : { "ignore" : { "prereq_matches_use" : "required modules detected incorrectly" } }, - "x_serialization_backend" : "JSON::PP version 4.02" + "x_serialization_backend" : "JSON::PP version 4.06" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/META.yml new/Test-Needs-0.002009/META.yml --- old/Test-Needs-0.002006/META.yml 2019-04-04 22:43:09.000000000 +0200 +++ new/Test-Needs-0.002009/META.yml 2021-05-25 08:28:22.000000000 +0200 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.60, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -24,7 +24,7 @@ bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Needs license: http://dev.perl.org/licenses/ repository: https://github.com/haarg/Test-Needs.git -version: '0.002006' +version: '0.002009' x_cpants: ignore: prereq_matches_use: 'required modules detected incorrectly' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/lib/Test/Needs.pm new/Test-Needs-0.002009/lib/Test/Needs.pm --- old/Test-Needs-0.002006/lib/Test/Needs.pm 2019-04-04 22:42:43.000000000 +0200 +++ new/Test-Needs-0.002009/lib/Test/Needs.pm 2021-05-25 08:27:29.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; no warnings 'once'; -our $VERSION = '0.002006'; +our $VERSION = '0.002009'; $VERSION =~ tr/_//d; BEGIN { @@ -12,10 +12,18 @@ *_WORK_AROUND_BROKEN_MODULE_STATE = "$]" < 5.009 ? sub(){1} : sub(){0}; + + # this allows regexes to match wide characters in vstrings + if ("$]" >= 5.006001 && "$]" <= 5.006002) { + require utf8; + utf8->import; + } } our @EXPORT = qw(test_needs); +our $Level = 0; + sub _try_require { local %^H if _WORK_AROUND_HINT_LEAKAGE; @@ -42,7 +50,7 @@ my $i = 1; while (my ($p, $f, $l) = caller($i++)) { next - if $p->isa(__PACKAGE__); + if $p =~ /\ATest::Needs(?:::|\z)/; die "$message at $f line $l.\n"; } die $message; @@ -58,11 +66,11 @@ for ($_[0]) { return !$_ ? 0 - : /^[0-9]+\.[0-9]+$/ ? sprintf('%.6f', $_) - : /^v?([0-9]+(?:\.[0-9]+)+)$/ + : /^[0-9]+(?:\.[0-9]+)?$/ ? sprintf('%.6f', $_) + : /^v?([0-9]+(?:\.[0-9]+)*)$/ ? sprintf('%d.%03d%03d', ((split /\./, $1), 0, 0)[0..2]) - : /^(\x05)(.*)$/s - ? sprintf('%d.%03d%03d', map ord, $1, split //, $2) + : /^([\x05-\x07])(.*)$/s + ? sprintf('%d.%03d%03d', ((map ord, /(.)/gs), 0, 0)[0..2]) : _croak qq{version "$_" does not look like a number}; } } @@ -92,7 +100,7 @@ my $class = shift; my $target = caller; if (@_) { - local $Test::Builder::Level = ($Test::Builder::Level||0) + 1; + local $Level = $Level + 1; test_needs(@_); } no strict 'refs'; @@ -102,7 +110,7 @@ sub test_needs { my $missing = _find_missing(@_); - local $Test::Builder::Level = ($Test::Builder::Level||0) + 1; + local $Level = $Level + 1; if ($missing) { if ($ENV{RELEASE_TESTING}) { _fail("$missing due to RELEASE_TESTING"); @@ -111,11 +119,17 @@ _skip($missing); } } - + return 1; } -sub _skip { _fail_or_skip($_[0], 0) } -sub _fail { _fail_or_skip($_[0], 1) } +sub _skip { + local $Level = $Level + 1; + _fail_or_skip($_[0], 0) +} +sub _fail { + local $Level = $Level + 1; + _fail_or_skip($_[0], 1) +} sub _pairs { map +( @@ -134,7 +148,7 @@ sub _fail_or_skip { my ($message, $fail) = @_; if ($INC{'Test2/API.pm'}) { - my $ctx = Test2::API::context(); + my $ctx = Test2::API::context(level => $Level); my $hub = $ctx->hub; if ($fail) { $ctx->ok(0, "Test::Needs modules available", [$message]); @@ -157,6 +171,7 @@ $ctx->send_event('+'._t2_terminate_event()); } elsif ($INC{'Test/Builder.pm'}) { + local $Test::Builder::Level = $Test::Builder::Level + $Level; my $tb = Test::Builder->new; my $has_plan = Test::Builder->can('has_plan') ? 'has_plan' : sub { $_[0]->expected_tests || eval { $_[0]->current_test($_[0]->current_test); 'no_plan' } }; @@ -174,7 +189,7 @@ = $plan && $plan ne 'no_plan' ? $plan - $tests : 1; $tb->skip("Test::Needs modules not available") for 1 .. $skips; - Test::Builer->can('note') ? $tb->note($message) : print "# $message\n"; + Test::Builder->can('note') ? $tb->note($message) : print "# $message\n"; } else { $tb->skip_all($message); @@ -204,17 +219,19 @@ return $terminate_event if $terminate_event; local $@; - my $file = __FILE__; - $terminate_event = eval <<"END_CODE" or die "$@"; + $terminate_event = eval sprintf <<'END_CODE', __LINE__+2, __FILE__ or die "$@"; +#line %d "%s" package # hide Test::Needs::Event::Terminate; use Test2::Event (); - our \@ISA = qw(Test2::Event); + our @ISA = qw(Test2::Event); sub no_display { 1 } sub terminate { 0 } - \$INC{'Test/Needs/Event/Terminate.pm'} = \$file; __PACKAGE__; END_CODE + (my $pm = "$terminate_event.pm") =~ s{::}{/}g; + $INC{$pm} = __FILE__; + $terminate_event; } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/maint/Makefile.PL.include new/Test-Needs-0.002009/maint/Makefile.PL.include --- old/Test-Needs-0.002006/maint/Makefile.PL.include 2016-06-03 16:40:59.000000000 +0200 +++ new/Test-Needs-0.002009/maint/Makefile.PL.include 2021-01-20 19:58:02.000000000 +0100 @@ -1,4 +1,4 @@ -BEGIN { -e 'Distar' or system("git clone git://git.shadowcat.co.uk/p5sagit/Distar.git") } +BEGIN { -e 'Distar' or system qw(git clone https://github.com/p5sagit/Distar.git) } use lib 'Distar/lib'; use Distar 0.001; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/t/basic.t new/Test-Needs-0.002009/t/basic.t --- old/Test-Needs-0.002006/t/basic.t 2019-04-04 22:13:25.000000000 +0200 +++ new/Test-Needs-0.002009/t/basic.t 2019-07-12 12:08:40.000000000 +0200 @@ -2,10 +2,54 @@ use warnings; use Test::More tests => 17*3 + 31*2; use IPC::Open3; +use Config (); delete $ENV{RELEASE_TESTING}; -my @perl = ($^X, map "-I$_", @INC, 't/lib'); +my @perl = $^X =~ /(.*)/s; + +{ + my $taint; + local $^W = 0; + local $@; + local $SIG{__DIE__}; + local $SIG{__WARN__} = sub { + $taint = 1; + push @perl, '-t'; + }; + if (!eval { eval substr($ENV{PATH}, 0, 0); 1 }) { + $taint = 1; + push @perl, '-T'; + } + if ($taint) { + $ENV{PATH} = '/'; + delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; + } +} + +my %inc; +{ + my $cmd = join ' ', map qq{"$_"}, @perl, '-le', 'print for @INC'; + my @inc = `$cmd`; + chomp @inc; + @inc{@inc} = (); +} +my @need_inc; +my $i = -1; +push @need_inc, $INC[$i] + while ++$i < @INC && !exists $inc{$INC[$i]}; + +my $inc_extension = qr/[\\\/]\Q$Config::Config{archname}\E|[\\\/]\Q$Config::Config{version}\E(?:[\\\/]\Q$Config::Config{archname}\E)?/; + +my $bare; +for my $path (@need_inc) { + unless (defined $bare and $path =~ /\A\Q$bare\E$inc_extension\z/) { + $bare = $path; + push @perl, "-I$path"; + } +} + +push @perl, "-It/lib"; my $missing = "Module::Does::Not::Exist::".time; @@ -32,7 +76,7 @@ if $e; "$_ $o"; } @load; - printf "# Checking against ".join(', ', @using)."\n" + print "# Checking against ".join(', ', @using)."\n" if @using; my $check = sub { my ($args, $match, $name) = @_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Needs-0.002006/t/numify_version.t new/Test-Needs-0.002009/t/numify_version.t --- old/Test-Needs-0.002006/t/numify_version.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-Needs-0.002009/t/numify_version.t 2020-08-11 00:47:51.000000000 +0200 @@ -0,0 +1,67 @@ +use strict; +use warnings; +use Test::More; +use Test::Needs (); + +my @try = ( + [ '5' => '5.000000' ], + [ 'v5' => '5.000000' ], + [ '"5"' => '5.000000' ], + [ '"v5"' => '5.000000' ], + + [ '5.008000' => '5.008000' ], + [ '5.8.0' => '5.008000' ], + [ 'v5.8.0' => '5.008000' ], + [ '"5.8.0"' => '5.008000' ], + [ '"v5.8.0"' => '5.008000' ], + + [ '5.010' => '5.010000' ], + [ 'v5.10' => '5.010000' ], + [ '"v5.10"' => '5.010000' ], + + [ '5.999000' => '5.999000' ], + [ '5.999.0' => '5.999000' ], + [ 'v5.999.0' => '5.999000' ], + [ '"5.999.0"' => '5.999000' ], + [ '"v5.999.0"' => '5.999000' ], + + [ '6' => '6.000000' ], + [ 'v6' => '6.000000' ], + [ '"6"' => '6.000000' ], + [ '"v6"' => '6.000000' ], + + [ '6.999000' => '6.999000' ], + [ '6.999.0' => '6.999000' ], + [ 'v6.999.0' => '6.999000' ], + [ '"6.999.0"' => '6.999000' ], + [ '"v6.999.0"' => '6.999000' ], + + [ '7' => '7.000000' ], + [ 'v7' => '7.000000' ], + [ '"7"' => '7.000000' ], + [ '"v7"' => '7.000000' ], + + [ '7.999000' => '7.999000' ], + [ '7.999.0' => '7.999000' ], + [ 'v7.999.0' => '7.999000' ], + [ '"7.999.0"' => '7.999000' ], + [ '"v7.999.0"' => '7.999000' ], +); + +plan tests => 1 + scalar @try; + +my @warnings; +local $SIG{__WARN__} = sub { push @warnings, @_; warn @_ }; + +for (@try) { + my ($in, $want) = @$_; + SKIP: { + my $evaled = eval $in; + skip "$in is unsupported syntax on perl $]", 1 + if $@; + my $got = Test::Needs::_numify_version($evaled); + is $got, $want, sprintf "%10s parses correctly as %s", $in, $want; + } +} + +is scalar @warnings, 0, "no warnings";