Changeset 1550 in ProjectBuilder for devel/pb/bin
- Timestamp:
- May 21, 2012, 2:32:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r1549 r1550 17 17 # in their respective section 18 18 use Getopt::Long qw(:config auto_abbrev no_ignore_case); 19 use Carp 'cluck'; 19 20 use Data::Dumper; 20 21 use English; … … 1062 1063 1063 1064 # Try to use // processing here 1065 my $all_ok = 1; 1064 1066 my $pm = new Parallel::ForkManager($pbparallel) if (defined $pbparallel); 1067 $pm->run_on_finish(sub { my ($pid, $code, $id, $signal, $dump) = @_; 1068 $all_ok = 0 unless (($code == 0) && ($signal == 0) && ($dump == 0)); }); 1065 1069 1066 1070 pb_log(0,"Preparing delivery ...\n"); … … 1189 1193 # In the parent, we need to get the result from the children 1190 1194 $pm->wait_all_children if (defined $pbparallel); 1195 die "Aborting, one or more of the children failed." if ((not $all_ok) && ($Global::pb_stop_on_error)); 1191 1196 my $made = ""; 1192 1197 my %h = (); … … 1702 1707 $made .= " ".pb_get_content($f); 1703 1708 } 1704 die "Aborting, one or more of the children failed. \n" if ((not $all_ok) && ($Global::pb_stop_on_error));1709 die "Aborting, one or more of the children failed." if ((not $all_ok) && ($Global::pb_stop_on_error)); 1705 1710 pb_rm_rf($tmpd); 1706 1711 } … … 2250 2255 # Do not touch when just announcing 2251 2256 if (($cmt ne "Announce") && ($cmt ne "CPAN")) { 2252 pb_system("$shcmd \"mkdir -p $tdir ; cd $tdir ; echo \'for i in $basesrc; do if [ -f \$i ]; then rm -f \$i; fi; done\ ; $cmd' | bash \"","Preparing $tdir on $cptarget");2257 pb_system("$shcmd \"mkdir -p $tdir ; cd $tdir ; echo \'for i in $basesrc; do if [ -f \$i ]; then rm -f \$i; fi; done\ ; $cmd' | bash-e\"","Preparing $tdir on $cptarget"); 2253 2258 } else { 2254 2259 $logres = "> "; … … 2645 2650 my ($vmexist,$vmpid) = (undef,undef); 2646 2651 my $pm; 2652 my $all_ok = 1; 2647 2653 if (defined $pbparallel) { 2648 2654 $pm = new Parallel::ForkManager($pbparallel); … … 2650 2656 # Set which port the VM/RM will use to communicate 2651 2657 $pm->run_on_start(\&pb_set_port); 2658 $pm->run_on_finish(sub { my ($pid, $code, $id, $signal, $dump) = @_; 2659 unless ($code == 0 && $signal == 0 && $dump == 0) { 2660 pb_log(0,"ERROR: pid $pid failed\n"); 2661 } 2662 }); 2652 2663 } 2653 2664 … … 2776 2787 } 2777 2788 $pm->wait_all_children if (defined $pbparallel); 2789 die "Aborting, one or more of the children failed." if ((not $all_ok) && ($Global::pb_stop_on_error)); 2778 2790 } 2779 2791 … … 2942 2954 2943 2955 my $pm; 2956 my $all_ok = 1; 2944 2957 if (defined $pbparallel) { 2945 2958 $pm = new Parallel::ForkManager($pbparallel); … … 2947 2960 # Set which port the VM/RM will use to communicate 2948 2961 $pm->run_on_start(\&pb_set_port); 2962 $pm->run_on_finish(sub { my ($pid, $code, $id, $signal, $dump) = @_; 2963 $all_ok = 0 unless (($code == 0) && ($signal == 0) && ($dump == 0)); 2964 }); 2949 2965 } 2950 2966 … … 3315 3331 my $dir = $m; 3316 3332 $dir =~ s/-.*//; 3317 pb_system("echo \"rm -rf $m* ; wget http://search.cpan.org/CPAN/modules/by-module/$dir/$m-$osperlver->{$m}.tar.gz ; gzip -cd $m-$osperlver->{$m}.tar.gz | tar xf - ; cd $m* ; if [ -f Build.PL ]; then perl Build.PL; ./Build ; ./Build install ; else perl Makefile.PL; make ; make install ; fi; cd .. ; rm -rf $m*\" | bash " ,"Installing perl module $m-$osperlver->{$m}");3333 pb_system("echo \"rm -rf $m* ; wget http://search.cpan.org/CPAN/modules/by-module/$dir/$m-$osperlver->{$m}.tar.gz ; gzip -cd $m-$osperlver->{$m}.tar.gz | tar xf - ; cd $m* ; if [ -f Build.PL ]; then perl Build.PL; ./Build ; ./Build install ; else perl Makefile.PL; make ; make install ; fi; cd .. ; rm -rf $m*\" | bash -e" ,"Installing perl module $m-$osperlver->{$m}"); 3318 3334 } 3319 3335 EOF … … 3402 3418 } 3403 3419 $pm->wait_all_children if (defined $pbparallel); 3420 die "Aborting, one or more of the children failed." if ((not $all_ok) && ($Global::pb_stop_on_error)); 3404 3421 return; 3405 3422 }
Note:
See TracChangeset
for help on using the changeset viewer.