From: Vincent Pit Date: Sun, 25 Jan 2009 23:04:46 +0000 (+0100) Subject: Remove duplicated dependencies X-Git-Tag: v0.06~8 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=6690c92b6845ba68f0accd0944b9b62e17ba0cdb;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git Remove duplicated dependencies --- diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index ed048f9..972fed8 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -400,6 +400,8 @@ sub create { } } + my %seen; + my $d = $stat->header; $d .= "# Generated by CPANPLUS::Dist::Gentoo version $VERSION\n\n"; $d .= 'MODULE_AUTHOR="' . $stat->author . "\"\ninherit perl-module\n\n"; @@ -411,8 +413,8 @@ sub create { $d .= 'LICENSE="|| ( ' . join(' ', sort @{$stat->license}) . " )\"\n"; $d .= 'KEYWORDS="' . join(' ', sort @{$stat->keywords}) . "\"\n"; $d .= 'DEPEND="' . join("\n", - 'dev-lang/perl', - map $self->_cpan2portage(@$_), @{$stat->deps} + sort grep !$seen{$_}++, 'dev-lang/perl', + map $self->_cpan2portage(@$_), @{$stat->deps} ) . "\"\n"; $d .= "SRC_TEST=\"do\"\n"; $d .= $stat->footer;