diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-12-11 09:03:27 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-12-11 09:03:27 +0000 |
commit | c894f7802e82644053bf301ad6d24aae3e046cb7 (patch) | |
tree | b80929f477f76380e0bda53da598fac29649b360 | |
parent | 07a7f870fc8908bcef0c32988477ae99536d3ccb (diff) | |
download | iurt-c894f7802e82644053bf301ad6d24aae3e046cb7.tar iurt-c894f7802e82644053bf301ad6d24aae3e046cb7.tar.gz iurt-c894f7802e82644053bf301ad6d24aae3e046cb7.tar.bz2 iurt-c894f7802e82644053bf301ad6d24aae3e046cb7.tar.xz iurt-c894f7802e82644053bf301ad6d24aae3e046cb7.zip |
perl_checker cleanup
-rwxr-xr-x | iurt | 8 | ||||
-rwxr-xr-x | ulri | 10 |
2 files changed, 9 insertions, 9 deletions
@@ -170,7 +170,7 @@ $run{todo} = []; sub { $run{clean} = \@_ }, "Activating clean chroot flag" ], [ "", "parallel", 1, "<n>", "Build up to <n> packages in parallel", - sub {($run{parallel}) = @_; 1}, "Enabling parallel build" ], + sub { ($run{parallel}) = @_; 1 }, "Enabling parallel build" ], [ "d", "dir", -1, "", "Directory where to find packages to rebuild", sub { $run{extra_dir} = \@_; 1 }, "Adding extra source packages directories" ], @@ -762,7 +762,7 @@ my $_s = sub { $run{main} = 1; sub rebuild_one { - my ($dir, $srpm, $status) = @_; + my ($dir, $srpm, $_status) = @_; # CM: Set argv[0] (in the C sense) to something we can easily spot and # understand in process list $0 = "Iurt: $run{distro_tag} $run{my_arch} $run{media} $srpm"; @@ -1015,7 +1015,7 @@ do { delete $children{$pid} if $pid > 0; } # TODO: check load, free memory and free disk - my $pid = fork; + $pid = fork(); if ($pid) { #parent $children{$pid} = 1; } elsif ($pid == 0) { #child @@ -1023,7 +1023,7 @@ do { rebuild_one($dir, $srpm, $status); write_status($local_spool, \%run, $srpm); clean_chroot($chroot_tmp, \%run, $config); - exit; + exit(); } else { die "could not fork"; } @@ -152,7 +152,7 @@ my %config_usage = ( desc => 'Default packager tag user by bot', default => 'Mageia Team <http://www.mageia.org>' }, - arch => { + 'arch' => { desc => 'Architectures list for each target', default => { cauldron => [ 'i586', 'x86_64' ], @@ -545,10 +545,10 @@ foreach my $prefix (sort keys %pkg_tree) { my @arch_list = keys %{$config->{bot}}; if (ref $config->{arch} eq 'ARRAY') { @arch_list = @{$config->{arch}}; - } elsif (ref $config->{arch}->{$target} eq 'ARRAY') { - @arch_list = @{$config->{arch}->{$target}}; - } elsif (ref $config->{arch}->{default} eq 'ARRAY') { - @arch_list = @{$config->{arch}->{default}}; + } elsif (ref $config->{arch}{$target} eq 'ARRAY') { + @arch_list = @{$config->{arch}{$target}}; + } elsif (ref $config->{arch}{default} eq 'ARRAY') { + @arch_list = @{$config->{arch}{default}}; } # need to find a bot for each arch foreach my $arch (@arch_list) { |