Hello community,
here is the log from the commit of package perl-Module-ScanDeps for
openSUSE:Factory checked in at 2016-04-12 19:35:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Module-ScanDeps (Old)
and /work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Module-ScanDeps"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Module-ScanDeps/perl-Module-ScanDeps.changes
2015-10-12 10:01:52.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new/perl-Module-ScanDeps.changes
2016-04-12 19:35:21.000000000 +0200
@@ -1,0 +2,19 @@
+Thu Apr 7 09:40:30 UTC 2016 - [email protected]
+
+- updated to 1.21
+ see /usr/share/doc/packages/perl-Module-ScanDeps/Changes
+
+ 1.21 2016-04-05
+
+ - %Preload: add rules for List::MoreUtils and Log::Dispatch
+
+ - %Preload: make the following modules require the unicore stuff:
+ charnames.pm
+ Unicode/Normalize.pm
+ Unicode/UCD.pm
+
+ - add helper _glob_in_inc_1()
+
+ - remove all references to http://par.perl.org/, doesn't exist anymore
+
+-------------------------------------------------------------------
Old:
----
Module-ScanDeps-1.20.tar.gz
New:
----
Module-ScanDeps-1.21.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Module-ScanDeps.spec ++++++
--- /var/tmp/diff_new_pack.6Fs8Vw/_old 2016-04-12 19:35:22.000000000 +0200
+++ /var/tmp/diff_new_pack.6Fs8Vw/_new 2016-04-12 19:35:22.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Module-ScanDeps
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: perl-Module-ScanDeps
-Version: 1.20
+Version: 1.21
Release: 0
%define cpan_name Module-ScanDeps
Summary: Recursively scan Perl code for dependencies
@@ -61,8 +61,8 @@
my $packer = App::Packer->new( frontend => 'Module::ScanDeps' );
...
-Please see the App::Packer::Frontend manpage for detailed explanation on
-the structure returned by 'get_files'.
+Please see App::Packer::Frontend for detailed explanation on the structure
+returned by 'get_files'.
%prep
%setup -q -n %{cpan_name}-%{version}
++++++ Module-ScanDeps-1.20.tar.gz -> Module-ScanDeps-1.21.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.20/Changes
new/Module-ScanDeps-1.21/Changes
--- old/Module-ScanDeps-1.20/Changes 2015-10-04 15:12:33.000000000 +0200
+++ new/Module-ScanDeps-1.21/Changes 2016-04-05 12:07:12.000000000 +0200
@@ -1,3 +1,16 @@
+1.21 2016-04-05
+
+- %Preload: add rules for List::MoreUtils and Log::Dispatch
+
+- %Preload: make the following modules require the unicore stuff:
+ charnames.pm
+ Unicode/Normalize.pm
+ Unicode/UCD.pm
+
+- add helper _glob_in_inc_1()
+
+- remove all references to http://par.perl.org/, doesn't exist anymore
+
1.20 2015-10-04
- Fix RT #107304: Newer versions of File::Path cause warning "_Inline for
_Inline: No such file or directory at Module/ScanDeps.pm line 1339."
@@ -37,8 +50,8 @@
...
);
- scan_deps_static() register a dependency on Bar.pm _and_
- Quux.pm when it saw "use Foo;"
+ scan_deps_static() registers a dependency on Bar.pm _and_
+ Quux.pm when it has seen "use Foo;"
- Minor changes:
- drop dubious %Preload of utf8.pm for SOAP::Lite and XML::Parser::Expat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.20/META.yml
new/Module-ScanDeps-1.21/META.yml
--- old/Module-ScanDeps-1.20/META.yml 2015-10-04 15:16:02.000000000 +0200
+++ new/Module-ScanDeps-1.21/META.yml 2016-04-05 12:08:33.000000000 +0200
@@ -34,4 +34,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: https://www.openfoundry.org/svn/par/Module-ScanDeps/trunk
-version: '1.20'
+version: '1.21'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.20/lib/Module/ScanDeps.pm
new/Module-ScanDeps-1.21/lib/Module/ScanDeps.pm
--- old/Module-ScanDeps-1.20/lib/Module/ScanDeps.pm 2015-10-04
14:56:12.000000000 +0200
+++ new/Module-ScanDeps-1.21/lib/Module/ScanDeps.pm 2016-04-03
19:48:39.000000000 +0200
@@ -4,7 +4,7 @@
use warnings;
use vars qw( $VERSION @EXPORT @EXPORT_OK @ISA $CurrentPackage @IncludeLibs
$ScanFileRE );
-$VERSION = '1.20';
+$VERSION = '1.21';
@EXPORT = qw( scan_deps scan_deps_runtime );
@EXPORT_OK = qw( scan_line scan_chunk add_deps scan_deps_runtime
path_to_inc_name );
@@ -258,9 +258,7 @@
'Catalyst/Engine.pm' => 'sub',
'CGI/Application/Plugin/Authentication.pm' => [qw(
CGI/Application/Plugin/Authentication/Store/Cookie.pm )],
'CGI/Application/Plugin/AutoRunmode.pm' => [qw( Attribute/Handlers.pm )],
- 'charnames.pm' => sub {
- _find_in_inc('unicore/Name.pl') ? 'unicore/Name.pl' : 'unicode/Name.pl'
- },
+ 'charnames.pm' => \&_unicore,
'Class/Load.pm' => [qw( Class/Load/PP.pm )],
'Class/MakeMethods.pm' => 'sub',
'Class/MethodMaker.pm' => 'sub',
@@ -363,9 +361,11 @@
# but accept JSON::XS, too (because JSON.pm might use it if present)
return( grep /^JSON\/(PP|XS)/, _glob_in_inc('JSON', 1) );
},
- 'Locale/Maketext/Lexicon.pm' => 'sub',
+ 'List/MoreUtils.pm' => 'sub',
+ 'Locale/Maketext/Lexicon.pm' => 'sub',
'Locale/Maketext/GutsLoader.pm' => [qw( Locale/Maketext/Guts.pm )],
'Log/Any.pm' => 'sub',
+ 'Log/Dispatch.pm' => 'sub',
'Log/Log4perl.pm' => 'sub',
'Log/Report/Dispatcher.pm' => 'sub',
'LWP/MediaTypes.pm' => [qw( LWP/media.types )],
@@ -495,7 +495,8 @@
'Tk/FBox.pm' => [qw( Tk/folder.xpm Tk/file.xpm )],
'Tk/Getopt.pm' => [qw( Tk/openfolder.xpm Tk/win.xbm )],
'Tk/Toplevel.pm' => [qw( Tk/Wm.pm )],
- 'Unicode/UCD.pm' => [qw( utf8_heavy.pl )],
+ 'Unicode/Normalize.pm' => \&_unicore,
+ 'Unicode/UCD.pm' => \&_unicore,
'URI.pm' => sub { grep !/urn/, _glob_in_inc('URI', 1) },
'utf8_heavy.pl' => \&_unicore,
'Win32/EventLog.pm' => [qw( Win32/IPC.pm )],
@@ -716,12 +717,11 @@
sub scan_deps_runtime {
my %args = (
- perl => $^X,
rv => {},
(@_ and $_[0] =~ /^(?:$Keys)$/o) ? @_ : (files => [@_], recurse => 1)
);
- my ($files, $rv, $execute, $compile, $skip, $perl) =
- @args{qw( files rv execute compile skip perl )};
+ my ($files, $rv, $execute, $compile) =
+ @args{qw( files rv execute compile )};
$files = (ref($files)) ? $files : [$files];
@@ -729,20 +729,15 @@
foreach my $file (@$files) {
next unless $file =~ $ScanFileRE;
- my ($inchash, $dl_shared_objects, $incarray) = ({}, [], []);
- _compile_or_execute($perl, $file, undef,
- $inchash, $dl_shared_objects, $incarray);
-
+ my ($inchash, $dl_shared_objects, $incarray) =
_compile_or_execute($file);
_merge_rv(_make_rv($inchash, $dl_shared_objects, $incarray), $rv);
}
}
elsif ($execute) {
foreach my $file (@$files) {
$execute = [] unless ref $execute; # make sure it's an array ref
- my ($inchash, $dl_shared_objects, $incarray) = ({}, [], []);
- _compile_or_execute($perl, $file, $execute,
- $inchash, $dl_shared_objects, $incarray);
+ my ($inchash, $dl_shared_objects, $incarray) =
_compile_or_execute($file, $execute);
_merge_rv(_make_rv($inchash, $dl_shared_objects, $incarray), $rv);
}
}
@@ -1181,9 +1176,36 @@
return @files;
}
+# like _glob_in_inc, but looks only at the first level
+# (i.e. the children of $subdir)
+# NOTE: File::Find has no public notion of the depth of the traversal
+# in its "wanted" callback, so it's not helpful
+sub _glob_in_inc_1 {
+ my $subdir = shift;
+ my $pm_only = shift;
+ my @files;
+
+ $subdir =~ s/\$CurrentPackage/$CurrentPackage/;
+
+ foreach my $inc (grep !/\bBSDPAN\b/, @INC, @IncludeLibs) {
+ my $dir = "$inc/$subdir";
+ next unless -d $dir;
+
+ opendir my $dh, $dir or next;
+ my @names = map { "$subdir/$_" } grep { -f "$dir/$_" } readdir $dh;
+ closedir $dh;
+
+ push @files, $pm_only
+ ? ( grep { /\.p[mh]$/i } @names )
+ : ( map { { file => "$inc/$_", name => $_ } } @names );
+ }
+
+ return @files;
+}
+
my $unicore_stuff;
sub _unicore {
- $unicore_stuff ||= [ map $_->{name}, _glob_in_inc('unicore', 0) ];
+ $unicore_stuff ||= [ 'utf8_heavy.pl', map $_->{name},
_glob_in_inc('unicore', 0) ];
return @$unicore_stuff;
}
@@ -1295,26 +1317,26 @@
# compile $file if $execute is undef,
# otherwise execute $file with arguments @$execute
sub _compile_or_execute {
- my ($perl, $file, $execute, $inchash, $dl_shared_objects, $incarray) = @_;
+ my ($file, $execute) = @_;
- my ($fh, $instrumented_file) = File::Temp::tempfile();
+ my ($ih, $instrumented_file) = File::Temp::tempfile(UNLINK => 1);
# spoof $0 (to $file) so that FindBin works as expected
# NOTE: We don't directly assign to $0 as it has magic (i.e.
# assigning has side effects and may actually fail, cf. perlvar(1)).
# Instead we alias *0 to a package variable holding the correct value.
local $ENV{MSD_ORIGINAL_FILE} = $file;
- print $fh <<'...';
+ print $ih <<'...';
BEGIN { my $_0 = $ENV{MSD_ORIGINAL_FILE}; *0 = \$_0; }
...
- my (undef, $data_file) = File::Temp::tempfile();
+ my (undef, $data_file) = File::Temp::tempfile(UNLINK => 1);
local $ENV{MSD_DATA_FILE} = $data_file;
# NOTE: When compiling the block will run as the last CHECK block;
# when executing the block will run as the first END block and
# the programs continues.
- print $fh $execute ? "END\n" : "CHECK\n", <<'...';
+ print $ih $execute ? "END\n" : "CHECK\n", <<'...';
{
# save %INC etc so that requires below don't pollute them
my %_INC = %INC;
@@ -1400,29 +1422,26 @@
# append the file to compile or execute
{
- open my $in, "<", $file or die "Couldn't open $file: $!";
- print $fh qq[#line 1 "$file"\n], <$in>;
- close $in;
+ open my $fh, "<", $file or die "Couldn't open $file: $!";
+ print $ih qq[#line 1 "$file"\n], <$fh>;
+ close $fh;
}
- close $fh;
+ close $ih;
# run the instrumented file
- my @cmd = ($perl);
- push @cmd, "-c" unless $execute;
- push @cmd, map { "-I$_" } @IncludeLibs;
- push @cmd, $instrumented_file;
- push @cmd, @$execute if $execute;
- my $rc = system(@cmd);
-
- _extract_info($data_file, $inchash, $dl_shared_objects, $incarray)
- if $rc == 0;
-
- unlink($instrumented_file, $data_file);
+ my $rc = system(
+ $^X,
+ $execute ? () : ("-c"),
+ (map { "-I$_" } @IncludeLibs),
+ $instrumented_file,
+ $execute ? @$execute : ());
die $execute
? "SYSTEM ERROR in executing $file @$execute: $rc"
: "SYSTEM ERROR in compiling $file: $rc"
unless $rc == 0;
+
+ return _extract_info($data_file);
}
# create a new hashref, applying fixups
@@ -1465,7 +1484,7 @@
}
sub _extract_info {
- my ($fname, $inchash, $dl_shared_objects, $incarray) = @_;
+ my ($fname) = @_;
use vars qw(%inchash @dl_shared_objects @incarray);
@@ -1474,9 +1493,10 @@
$@ || "can't read $fname: $!";
}
- $inchash->{$_} = $inchash{$_} for keys %inchash;
- @$dl_shared_objects = @dl_shared_objects;
- @$incarray = @incarray;
+ my %ih = %inchash;
+ my @dso = @dl_shared_objects;
+ my @ia = @incarray;
+ return (\%ih, \@dso, \@ia);
}
sub _gettype {
@@ -1629,8 +1649,7 @@
The B<scan_deps_runtime> function is contributed by Edward S. Peschko.
-L<http://par.perl.org/> is the official website for this module. You
-can write to the mailing list at E<lt>[email protected]<gt>, or send an empty
+You can write to the mailing list at E<lt>[email protected]<gt>, or send an empty
mail to E<lt>[email protected]<gt> to participate in the discussion.
Please submit bug reports to E<lt>[email protected]<gt>.