summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-12-29 21:49:50 +0100
committerJustin Davis <jrcd83@gmail.com>2011-12-29 21:49:50 +0100
commit3bdc584ef8f0c2d2b378e715bd56bb01b55cecb1 (patch)
tree25b5433c153e30fd97ddb3c4bed3cae1152c7fa0 /lib
parent34328fcd17291f33700407700ab0a8e0be6e8252 (diff)
downloadgenpkg-3bdc584ef8f0c2d2b378e715bd56bb01b55cecb1.tar.gz
genpkg-3bdc584ef8f0c2d2b378e715bd56bb01b55cecb1.tar.xz
Filter out deps on core modules, again.
The extra dependencies bug me...
Diffstat (limited to 'lib')
-rwxr-xr-xlib/metas/perl.d/perl-dist13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/metas/perl.d/perl-dist b/lib/metas/perl.d/perl-dist
index 7c64380..30eda37 100755
--- a/lib/metas/perl.d/perl-dist
+++ b/lib/metas/perl.d/perl-dist
@@ -174,14 +174,19 @@ sub _reqs2deps
my ($prereqs) = @_;
my (@mods, %pkgdeps);
- CPAN_DEP_LOOP:
+ # Filter out deps on 'perl' and any core modules that we can.
while(my ($name, $ver) = each(%$prereqs)) {
- # Sometimes a perl version is given as a prerequisite
+ my $cver = $Module::CoreList::version{$]}{$name};
if($name eq 'perl') {
$pkgdeps{'perl'} = _perldepver($ver);
- next CPAN_DEP_LOOP;
+ }elsif($cver && !$ver
+ || version->parse($ver) > version->parse($cver)){
+ # Only add deps for core modules if we need a higher
+ # version than what is in the core for our perl interpreter.
+ ;
+ }else{
+ push @mods, $name;
}
- push @mods, $name;
}
my %dists = _distsofmods(@mods);