summaryrefslogtreecommitdiffstats
path: root/bin/metas
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-10-20 20:45:53 +0200
committerJustin Davis <jrcd83@gmail.com>2011-10-20 20:45:53 +0200
commit623989ed692a74f40a162bb7a198ac8ffaf8215e (patch)
treec786acdad641a2b147b39624eda555e7b5dcc27c /bin/metas
parentd4b2e11abfa9b36cbe57917ee9e0cabffcf0b376 (diff)
downloadgenpkg-623989ed692a74f40a162bb7a198ac8ffaf8215e.tar.gz
genpkg-623989ed692a74f40a162bb7a198ac8ffaf8215e.tar.xz
Move test deps in makedepends to checkdepends, too.
Diffstat (limited to 'bin/metas')
-rwxr-xr-xbin/metas/perl.d/perl-dist26
1 files changed, 15 insertions, 11 deletions
diff --git a/bin/metas/perl.d/perl-dist b/bin/metas/perl.d/perl-dist
index ef08d0a..57b468b 100755
--- a/bin/metas/perl.d/perl-dist
+++ b/bin/metas/perl.d/perl-dist
@@ -130,19 +130,24 @@ sub _mergedups
return;
}
-#---HELPER FUNCTION---
-sub _yankcheckers
+sub _filterdeps(&$)
{
- my ($deps_ref) = @_;
- my %checkdeps;
+ my ($fsub, $deps) = @_;
+ my %fed;
- my @pkgs = keys %$deps_ref;
- for my $testdep (grep { /^perl-pod-coverage$|perl-test-/ } @pkgs){
- my $val = delete($deps_ref->{$testdep});
- $checkdeps{$testdep} = $val if(defined($val));
+ my @pkgs = keys(%$deps);
+ for my $dname (grep { $fsub->() } @pkgs){
+ my $dver = delete($deps->{$dname});
+ $fed{$dname} = $dver if(defined $dver);
}
- return \%checkdeps;
+ return \%fed;
+}
+
+#---HELPER FUNCTION---
+sub _yankcheckers
+{
+ _filterdeps { /^perl-pod-coverage$|^perl-test-/ } $_[0]
}
#---HELPER FUNCTION---
@@ -223,8 +228,7 @@ sub prereqs
# have this separated. Force any test modules to be checkdepends.
if(!$pkgdeps{'checkdepends'} && $pkgname !~ /\Aperl-test-/) {
my $checkdeps = {};
- my $makedeps = $pkgdeps{'makedepends'};
- _merge($checkdeps, _yankcheckers($makedeps));
+ _merge($checkdeps, _yankcheckers($pkgdeps{$_})) for(qw/makedepends depends/);
$pkgdeps{'checkdepends'} = $checkdeps;
}