From 6053042295415b5f57e0f476b1d75fdf5a3852b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Quelin?= Date: Tue, 10 Mar 2009 18:13:02 +0100 Subject: [PATCH] don't submit package on build system if missing prereqs --- lib/App/CPAN2Pkg.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/App/CPAN2Pkg.pm b/lib/App/CPAN2Pkg.pm index 06dfcbe..2bcce3a 100644 --- a/lib/App/CPAN2Pkg.pm +++ b/lib/App/CPAN2Pkg.pm @@ -242,9 +242,13 @@ sub upstream_install { sub upstream_import { - my ($k, $module, $success) = @_[KERNEL, ARG0, ARG1]; + my ($k, $h, $module, $success) = @_[KERNEL, HEAP, ARG0, ARG1]; # FIXME: what if wrong - # FIXME: don't submit if missing deps on bs + foreach my $m ( $module->prereqs ) { + my $mobj = $h->_module->{$m}; + next if $mobj->is_available_on_bs; + $k->delay( build_upstream => 30, $module, $success ); + } $k->post($module, 'build_upstream'); } -- 2.11.4.GIT