summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-09 18:28:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-09 18:28:31 +0000
commitb526f1673aa4ba42eaa7c7e38ed16c66a21b4436 (patch)
treebf4b612cfeada7c80a88953b120ef852f5cedf76
parent70d3120ac8df666ef3ddb47f7eae3174aa8254d0 (diff)
downloadurpmi-b526f1673aa4ba42eaa7c7e38ed16c66a21b4436.tar
urpmi-b526f1673aa4ba42eaa7c7e38ed16c66a21b4436.tar.gz
urpmi-b526f1673aa4ba42eaa7c7e38ed16c66a21b4436.tar.bz2
urpmi-b526f1673aa4ba42eaa7c7e38ed16c66a21b4436.tar.xz
urpmi-b526f1673aa4ba42eaa7c7e38ed16c66a21b4436.zip
cleanup
-rw-r--r--urpm/parallel_ka_run.pm17
1 files changed, 7 insertions, 10 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm
index 55cf02d5..1d02cdbc 100644
--- a/urpm/parallel_ka_run.pm
+++ b/urpm/parallel_ka_run.pm
@@ -33,10 +33,10 @@ sub parallel_register_rpms {
$? == 0 || $? == 256 or $urpm->{fatal}(1, N("mput failed, maybe a node is unreacheable"));
#- keep trace of direct files.
- foreach (@files) {
- my $basename = basename($_);
- $parallel->{line} .= "'$urpm->{cachedir}/rpms/$basename' ";
- }
+ $parallel->{line} .=
+ join(' ',
+ map { "'$_'" }
+ map { "$urpm->{cachedir}/rpms/" . basename($_) } @files);
}
#- parallel find_packages_to_remove
@@ -99,13 +99,10 @@ sub parallel_find_remove {
}
#- build error list contains all the error returned by each node.
- $urpm->{error_remove} = [];
- foreach (keys %bad_nodes) {
+ $urpm->{error_remove} = [ map {
my $msg = N("on node %s", $_);
- foreach (@{$bad_nodes{$_}}) {
- push @{$urpm->{error_remove}}, "$msg, $_";
- }
- }
+ map { "$msg, $_" } @{$bad_nodes{$_}};
+ } keys %bad_nodes ];
#- if at least one node has the package, it should be seen as unknown...
delete @notfound{map { /^(.*)-[^-]*-[^-]*$/ } keys %{$state->{rejected}}};