[carton] 360/472: make check scan faster as well

Lucas Kanashiro kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:39:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

kanashiro-guest pushed a commit to branch master
in repository carton.

commit 47799bb710cb18670735d1018031527e159b16bf
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date:   Wed Jul 24 08:25:31 2013 -0700

    make check scan faster as well
---
 lib/Carton/Tree.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/Carton/Tree.pm b/lib/Carton/Tree.pm
index b153570..4bc5926 100644
--- a/lib/Carton/Tree.pm
+++ b/lib/Carton/Tree.pm
@@ -54,8 +54,11 @@ sub merged_requirements {
     my $self = shift;
 
     my $merged_reqs = CPAN::Meta::Requirements->new;
+
+    my %seen;
     $self->walk_down(sub {
         my($dependency, $reqs, $level) = @_;
+        return Carton::Tree::STOP if $dependency && $seen{$dependency->distname}++;
         $merged_reqs->add_requirements($reqs);
     });
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git



More information about the Pkg-perl-cvs-commits mailing list