Hello community, here is the log from the commit of package perl-Test-CheckManifest for openSUSE:Factory checked in at 2019-03-01 20:30:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Test-CheckManifest (Old) and /work/SRC/openSUSE:Factory/.perl-Test-CheckManifest.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-CheckManifest" Fri Mar 1 20:30:56 2019 rev:4 rq:680362 version:1.41 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Test-CheckManifest/perl-Test-CheckManifest.changes 2019-02-24 17:15:06.856453610 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Test-CheckManifest.new.28833/perl-Test-CheckManifest.changes 2019-03-01 20:31:06.097986958 +0100 @@ -1,0 +2,11 @@ +Wed Feb 20 06:33:30 UTC 2019 - Stephan Kulow <co...@suse.com> + +- updated to 1.41 + see /usr/share/doc/packages/perl-Test-CheckManifest/Changes + + 1.41 2019-02-19 10:53:00 + + * improve tests + * Removed regex warnings on windows box as reported by CPANTESTERS (Thanks to manwar) + +------------------------------------------------------------------- Old: ---- Test-CheckManifest-1.39.tar.gz New: ---- Test-CheckManifest-1.41.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Test-CheckManifest.spec ++++++ --- /var/tmp/diff_new_pack.hEkyrH/_old 2019-03-01 20:31:06.625986829 +0100 +++ /var/tmp/diff_new_pack.hEkyrH/_new 2019-03-01 20:31:06.625986829 +0100 @@ -17,7 +17,7 @@ Name: perl-Test-CheckManifest -Version: 1.39 +Version: 1.41 Release: 0 %define cpan_name Test-CheckManifest Summary: Check if your Manifest matches your distro ++++++ Test-CheckManifest-1.39.tar.gz -> Test-CheckManifest-1.41.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/Changes new/Test-CheckManifest-1.41/Changes --- old/Test-CheckManifest-1.39/Changes 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/Changes 2019-02-19 11:22:16.000000000 +0100 @@ -1,6 +1,11 @@ Revision history for Perl extension Test::CheckManifest. ======================================================== +1.41 2019-02-19 10:53:00 + + * improve tests + * Removed regex warnings on windows box as reported by CPANTESTERS (Thanks to manwar) + 1.39 2019-02-14 07:28:00 * release 1.39 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/MANIFEST new/Test-CheckManifest-1.41/MANIFEST --- old/Test-CheckManifest-1.39/MANIFEST 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/MANIFEST 2019-02-19 11:22:16.000000000 +0100 @@ -1,6 +1,7 @@ # MANIFEST for Test-CheckManifest Changes MANIFEST +MANIFEST.SKIP CONTRIBUTORS CONTRIBUTING.md @@ -13,6 +14,7 @@ t/06_bailout.t t/07_is_in_dir.t t/08_check_manifest.t +t/09_manifest_files.t t/author-pod-coverage.t t/author-pod-syntax.t t/xt/02_issue1.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/MANIFEST.SKIP new/Test-CheckManifest-1.41/MANIFEST.SKIP --- old/Test-CheckManifest-1.39/MANIFEST.SKIP 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-CheckManifest-1.41/MANIFEST.SKIP 2019-02-19 11:22:16.000000000 +0100 @@ -0,0 +1,4 @@ +^Test.txt$ +data/Test2.dat +dist.ini +\.swp$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/META.json new/Test-CheckManifest-1.41/META.json --- old/Test-CheckManifest-1.39/META.json 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/META.json 2019-02-19 11:22:16.000000000 +0100 @@ -49,7 +49,7 @@ "provides" : { "Test::CheckManifest" : { "file" : "lib/Test/CheckManifest.pm", - "version" : "1.39" + "version" : "1.41" } }, "release_status" : "stable", @@ -64,7 +64,7 @@ "web" : "http://github.com/reneeb/Test-CheckManifest" } }, - "version" : "1.39", + "version" : "1.41", "x_contributors" : [ "doug <d...@hcsw.org>", "LorenzoTa <lorenz...@users.noreply.github.com>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/META.yml new/Test-CheckManifest-1.41/META.yml --- old/Test-CheckManifest-1.39/META.yml 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/META.yml 2019-02-19 11:22:16.000000000 +0100 @@ -17,7 +17,7 @@ provides: Test::CheckManifest: file: lib/Test/CheckManifest.pm - version: '1.39' + version: '1.41' requires: Carp: '0' Cwd: '3.75' @@ -32,7 +32,7 @@ bugtracker: http://github.com/reneeb/Test-CheckManifest/issues homepage: http://github.com/reneeb/Test-CheckManifest repository: http://github.com/reneeb/Test-CheckManifest.git -version: '1.39' +version: '1.41' x_contributors: - 'doug <d...@hcsw.org>' - 'LorenzoTa <lorenz...@users.noreply.github.com>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/Makefile.PL new/Test-CheckManifest-1.41/Makefile.PL --- old/Test-CheckManifest-1.39/Makefile.PL 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/Makefile.PL 2019-02-19 11:22:16.000000000 +0100 @@ -30,7 +30,7 @@ "CPAN::Meta::YAML" => 0, "Pod::Coverage::TrustPod" => 0 }, - "VERSION" => "1.39", + "VERSION" => "1.41", "test" => { "TESTS" => "t/*.t t/extra/*.t t/xt/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/README new/Test-CheckManifest-1.41/README --- old/Test-CheckManifest-1.39/README 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/README 2019-02-19 11:22:16.000000000 +0100 @@ -4,7 +4,7 @@ VERSION - version 1.39 + version 1.41 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/lib/Test/CheckManifest.pm new/Test-CheckManifest-1.41/lib/Test/CheckManifest.pm --- old/Test-CheckManifest-1.39/lib/Test/CheckManifest.pm 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/lib/Test/CheckManifest.pm 2019-02-19 11:22:16.000000000 +0100 @@ -13,7 +13,7 @@ use File::Find; use Scalar::Util qw(blessed); -our $VERSION = 1.39; +our $VERSION = 1.41; our $VERBOSE = 1; our $HOME; our $test_bool = 1; @@ -95,8 +95,8 @@ sub _find_home { my ($params) = @_; - my $tmp_path = File::Spec->rel2abs( $0 ); - my ($home, $volume, $dirs, $file, @dirs); + my $tmp_path = File::Spec->rel2abs( $0 ); + my ($home, $volume, $dirs, $file, @dirs); if ( $params->{file} ) { $tmp_path = $params->{file}; @@ -114,7 +114,7 @@ my $tmp_home = Cwd::realpath( File::Spec->catdir( $home, '..' ) ); - last if !$tmp_home || $tmp_home eq $home || $counter++ == 20; + last if !$tmp_home || $counter++ == 5; $home = $tmp_home; } @@ -122,6 +122,22 @@ return $home; } +sub _manifest_files { + my ($home, $manifest) = @_; + + my @files = _read_file( $manifest ); + + for my $tfile ( @files ) { + $tfile = ( split /\s{2,}/, $tfile, 2 )[0]; + + next if !-e $home . '/' . $tfile; + + $tfile = File::Spec->rel2abs($home . '/' . $tfile); + } + + return @files; +} + sub ok_manifest { my ($hashref,$msg) = _validate_args( @_ ); @@ -134,7 +150,7 @@ $test->BAILOUT( 'Cannot find a MANIFEST. Please check!' ); } - my @files = _read_file( $manifest ); + my @files = _manifest_files( $home, $manifest ); if ( !@files ) { $test->diag( "No files in MANIFEST found (is it readable?)" ); return; @@ -142,16 +158,9 @@ my $skip_path = File::Spec->catfile( $home, 'MANIFEST.SKIP' ); my @skip_files = _read_file( $skip_path ); + my @skip_rx = map{ qr/\Q$_\E/ }@skip_files; my $excluded = _check_excludes( $hashref, $home ); - for my $tfile ( @files ) { - $tfile = ( split /\s{2,}/, $tfile, 2 )[0]; - - next if !-e $home . '/' . $tfile; - - $tfile = File::Spec->rel2abs($home . '/' . $tfile); - } - my (@dir_files, %excluded); find({ @@ -164,7 +173,7 @@ $excluded, $hashref->{filter}, $hashref->{bool}, - \@skip_files, + \@skip_rx, $home, ); @@ -174,14 +183,13 @@ } },$home); - my $success = _check_manifest( \@dir_files, \@files, \%excluded, $msg ); - $test->diag( "MANIFEST: $manifest" ) if !$success; + my $success = _check_manifest( \@dir_files, \@files, \%excluded, $msg, $manifest ); return $success; } sub _check_manifest { - my ($existing_files, $manifest_files, $excluded, $msg) = @_; + my ($existing_files, $manifest_files, $excluded, $msg, $manifest) = @_; my @existing = @{ $existing_files || [] }; my @manifest = @{ $manifest_files || [] }; @@ -238,6 +246,8 @@ $test->diag($plus) if scalar @files_plus >= 1 and $test_bool == 1 and $VERBOSE; $test->diag($dup) if scalar @dup_files >= 1 and $test_bool == 1 and $VERBOSE; + $test->diag( "MANIFEST: $manifest" ) if !$success; + return $success; } @@ -286,7 +296,7 @@ $test_bool = 1; } -sub _is_excluded{ +sub _is_excluded { my ($file,$dirref,$filter,$bool,$files_in_skip,$home) = @_; $home = '' if !defined $home; @@ -296,12 +306,12 @@ if ( $files_in_skip ) { (my $local_file = $file) =~ s{\Q$home\E}{}; for my $rx ( @{$files_in_skip} ) { - my $regex = qr/$rx/; - return 1 if $local_file =~ $regex; + return 1 if $local_file =~ $rx; } } - - my @matches = grep{ $file =~ /$_$/ }@excluded_files; + + my $basename = basename $file; + my @matches = grep{ $basename eq $_ }@excluded_files; return 1 if @matches; @@ -372,7 +382,7 @@ =head1 VERSION -version 1.39 +version 1.41 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/t/03_find_home.t new/Test-CheckManifest-1.41/t/03_find_home.t --- old/Test-CheckManifest-1.39/t/03_find_home.t 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/t/03_find_home.t 2019-02-19 11:22:16.000000000 +0100 @@ -26,4 +26,6 @@ my @dirs_five = File::Spec->splitdir( $sub->( { dir => $dir } ) ); is_deeply \@dirs_five, \@dirs_one, 'dir ' . $dir; +#$sub->( { dir => $vol // '/' } ); + done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/t/08_check_manifest.t new/Test-CheckManifest-1.41/t/08_check_manifest.t --- old/Test-CheckManifest-1.39/t/08_check_manifest.t 2019-02-14 07:36:31.000000000 +0100 +++ new/Test-CheckManifest-1.41/t/08_check_manifest.t 2019-02-19 11:22:16.000000000 +0100 @@ -22,6 +22,14 @@ # my ($existing_files, $manifest_files, $excluded, $msg) = @_; +my $diag = ''; +{ + no warnings 'redefine'; + sub Test::Builder::diag { + $diag .= $_[1] . "\n"; + }; +} + my $cnt = 0; { @@ -36,12 +44,15 @@ ); for my $test ( @tests ) { + $diag = ''; + my @params = @{$test}; my $expected = pop @params; - my $result = $sub->( @params ); + my $result = $sub->( @params, 'No Manifest' ); is $result, $expected, "Test $cnt"; + $cnt++; } } @@ -49,20 +60,24 @@ { local $Test::CheckManifest::test_bool = 0; my @tests = ( - [ undef, undef, undef, 'test', 1 ], - [ ['/t/test'], undef, undef, 'test', '' ], - [ ['/t/test'], ['/t/test'], undef, 'test', 1 ], - [ ['/t/test'], undef, {'/t/test' => 1}, 'test', 1 ], - [ ['/t/test'], ['/test'], {'/t/test' => 1}, 'test', '' ], - [ ['/t/test'], ['/t/test', '/t/test'], undef, 'test', '' ], - [ ['/t/test','/t/test2'], ['/t/test'], undef, 'test', '' ], + [ undef, undef, undef, 'test', '' ], + [ ['/t/test'], undef, undef, 'test', 1 ], + [ ['/t/test'], ['/t/test'], undef, 'test', '' ], + [ ['/t/test'], undef, {'/t/test' => 1}, 'test', '' ], + [ ['/t/test'], ['/test'], {'/t/test' => 1}, 'test', 1 ], + [ ['/t/test'], ['/t/test', '/t/test'], undef, 'test', 1 ], + [ ['/t/test','/t/test2'], ['/t/test'], undef, 'test', 1 ], ); for my $test ( @tests ) { + $diag = ''; + my @params = @{$test}; my $expected = pop @params; - my $result = $sub->( @params ); + my $result = $sub->( @params, 'No Manifest' ); + + is $result, $expected; $cnt++; } } @@ -71,20 +86,25 @@ local $Test::CheckManifest::test_bool = 0; local $Test::CheckManifest::VERBOSE = 0; my @tests = ( - [ undef, undef, undef, 'test', 1 ], - [ ['/t/test'], undef, undef, 'test', '' ], - [ ['/t/test'], ['/t/test'], undef, 'test', 1 ], - [ ['/t/test'], undef, {'/t/test' => 1}, 'test', 1 ], - [ ['/t/test'], ['/test'], {'/t/test' => 1}, 'test', '' ], - [ ['/t/test'], ['/t/test', '/t/test'], undef, 'test', '' ], - [ ['/t/test','/t/test2'], ['/t/test'], undef, 'test', '' ], + [ undef, undef, undef, 'test', '' ], + [ ['/t/test'], undef, undef, 'test', 1 ], + [ ['/t/test'], ['/t/test'], undef, 'test', '' ], + [ ['/t/test'], undef, {'/t/test' => 1}, 'test', '' ], + [ ['/t/test'], ['/test'], {'/t/test' => 1}, 'test', 1 ], + [ ['/t/test'], ['/t/test', '/t/test'], undef, 'test', 1 ], + [ ['/t/test','/t/test2'], ['/t/test'], undef, 'test', 1 ], ); for my $test ( @tests ) { + $diag = ''; + my @params = @{$test}; my $expected = pop @params; - my $result = $sub->( @params ); + my $result = $sub->( @params, 'No Manifest' ); + + is $result, $expected; + $cnt++; } } @@ -102,10 +122,15 @@ ); for my $test ( @tests ) { + $diag = ''; + my @params = @{$test}; my $expected = pop @params; - my $result = $sub->( @params ); + my $result = $sub->( @params, 'No Manifest' ); + + is $result, $expected; + $cnt++; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-CheckManifest-1.39/t/09_manifest_files.t new/Test-CheckManifest-1.41/t/09_manifest_files.t --- old/Test-CheckManifest-1.39/t/09_manifest_files.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-CheckManifest-1.41/t/09_manifest_files.t 2019-02-19 11:22:16.000000000 +0100 @@ -0,0 +1,24 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use File::Basename; +use File::Spec; +use Test::More; +use Test::CheckManifest; + +use Cwd; + +local $ENV{NO_MANIFEST_CHECK} = 1; + +my $sub = Test::CheckManifest->can('_manifest_files'); +ok $sub; + +my $dir = dirname __FILE__; +my $manifest = File::Spec->catfile( $dir, '..', 'MANIFEST' ); + +my @files = $sub->( $dir, $manifest ); +ok @files; + +done_testing();