diff options
author | Ricardo Signes <rjbs@cpan.org> | 2010-01-20 09:52:31 -0500 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2010-01-20 09:52:44 -0500 |
commit | 2908b263df5784d122bb6eb465f6512af2ea45b5 (patch) | |
tree | cfa3fbd534c8fff06b4b7ddd7f659af2b74ad5f2 /Porting/core-cpan-diff | |
parent | a2bff36e3c50a471cb4481f58ae8a9285d3f17b9 (diff) | |
download | perl-2908b263df5784d122bb6eb465f6512af2ea45b5.tar.gz |
add -u to core-cpan-diffs to filter modulesv5.11.4
Diffstat (limited to 'Porting/core-cpan-diff')
-rwxr-xr-x | Porting/core-cpan-diff | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Porting/core-cpan-diff b/Porting/core-cpan-diff index 0e9f747724..4b34a2ee93 100755 --- a/Porting/core-cpan-diff +++ b/Porting/core-cpan-diff @@ -75,6 +75,8 @@ Usage: $0 [opts] [ -d | -v | -x ] [ -a | module ... ] -r/--reverse Reverses the diff (perl to CPAN). +-u/--upstream only print modules with the given upstream (defaults to all) + -v/--verbose List the fate of *all* files in the tarball, not just those that differ or are missing. @@ -97,6 +99,7 @@ sub run { my $scan_all; my $diff_opts; my $reverse = 0; + my @wanted_upstreams; my $cache_dir; my $use_diff; my $output_file; @@ -113,6 +116,7 @@ sub run { 'h|help' => \&usage, 'o|output=s' => \$output_file, 'r|reverse' => \$reverse, + 'u|upstream=s@'=> \@wanted_upstreams, 'v|verbose' => \$verbose, 'x|crosscheck' => \$do_crosscheck, ) or usage; @@ -157,7 +161,7 @@ sub run { } else { do_compare(\@modules, $outfh, $output_file, $cache_dir, $verbose, $use_diff, - $reverse, $diff_opts); + $reverse, $diff_opts, \@wanted_upstreams); } } @@ -167,7 +171,7 @@ sub run { sub do_compare { my ($modules, $outfh, $output_file, $cache_dir, $verbose, - $use_diff, $reverse, $diff_opts) = @_; + $use_diff, $reverse, $diff_opts, $wanted_upstreams) = @_; # first, make sure we have a directory where they can all be untarred, @@ -207,6 +211,8 @@ sub do_compare { warn "WARNING: duplicate entry for $dist in $module\n" } + my $upstream = $m->{UPSTREAM} || 'UNKNOWN'; + next if @$wanted_upstreams and ! ($upstream ~~ $wanted_upstreams); print $outfh "\n$module - ".$Maintainers::Modules{$module}->{DISTRIBUTION}."\n" unless $use_diff; print $outfh " upstream is: ".($m->{UPSTREAM} || 'UNKNOWN!')."\n"; |