diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-09 18:31:23 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-09 18:31:23 +0000 |
commit | bb8676359506223e1510e845685957e9a0754cde (patch) | |
tree | b7ac442a674370b6245544c52c9d81f6e1769d94 | |
parent | b526f1673aa4ba42eaa7c7e38ed16c66a21b4436 (diff) | |
download | urpmi-bb8676359506223e1510e845685957e9a0754cde.tar urpmi-bb8676359506223e1510e845685957e9a0754cde.tar.gz urpmi-bb8676359506223e1510e845685957e9a0754cde.tar.bz2 urpmi-bb8676359506223e1510e845685957e9a0754cde.tar.xz urpmi-bb8676359506223e1510e845685957e9a0754cde.zip |
factorize
-rw-r--r-- | urpm/parallel.pm | 10 | ||||
-rw-r--r-- | urpm/parallel_ka_run.pm | 6 | ||||
-rw-r--r-- | urpm/parallel_ssh.pm | 6 |
3 files changed, 12 insertions, 10 deletions
diff --git a/urpm/parallel.pm b/urpm/parallel.pm index 442dd29d..441da68a 100644 --- a/urpm/parallel.pm +++ b/urpm/parallel.pm @@ -66,4 +66,14 @@ sub remove { ); } +sub post_register_rpms { + my ($parallel, $urpm, @files) = @_; + + #- keep trace of direct files. + $parallel->{line} .= + join(' ', + map { "'$_'" } + map { "$urpm->{cachedir}/rpms/" . basename($_) } @files); +} + 1; diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm index 1d02cdbc..3a0c79f5 100644 --- a/urpm/parallel_ka_run.pm +++ b/urpm/parallel_ka_run.pm @@ -32,11 +32,7 @@ sub parallel_register_rpms { system $mput_command, split(' ', $parallel->{options}), '--', @files, "$urpm->{cachedir}/rpms/"; $? == 0 || $? == 256 or $urpm->{fatal}(1, N("mput failed, maybe a node is unreacheable")); - #- keep trace of direct files. - $parallel->{line} .= - join(' ', - map { "'$_'" } - map { "$urpm->{cachedir}/rpms/" . basename($_) } @files); + urpm::parallel::post_register_rpms($parallel, $urpm, @files); } #- parallel find_packages_to_remove diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm index d17bb061..722112eb 100644 --- a/urpm/parallel_ssh.pm +++ b/urpm/parallel_ssh.pm @@ -34,11 +34,7 @@ sub parallel_register_rpms { $? == 0 or $urpm->{fatal}(1, N("scp failed on host %s (%d)", $host, $? >> 8)); } - #- keep trace of direct files. - $parallel->{line} .= - join(' ', - map { "'$_'" } - map { "$urpm->{cachedir}/rpms/" . basename($_) } @files); + urpm::parallel::post_register_rpms($parallel, $urpm, @files); } #- parallel find_packages_to_remove |