diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-03 08:50:40 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-03 08:50:40 +0000 |
commit | 7f12a73d7c071e6625462d3867626ba00f283d2d (patch) | |
tree | 6287bed4acd3e06e24e555c9d0c9b88646841060 /urpme | |
parent | 5c4c93817a7e059c87253f6e8a241e3d8c71fdcd (diff) | |
download | urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.tar urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.tar.gz urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.tar.bz2 urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.tar.xz urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.zip |
factorize code
Diffstat (limited to 'urpme')
-rw-r--r-- | urpme | 23 |
1 files changed, 9 insertions, 14 deletions
@@ -136,21 +136,16 @@ if ($options{auto}) { #- Warning : the following message is parsed in urpm::parallel_* print N("removing %s", join(' ', sort @toremove)) . "\n"; + +my %remove_options = ( + test => $test, + force => $force, + noscripts => $urpm->{options}{noscripts}, + repackage => $urpm->{options}{repackage}, +); my @errors = $parallel - ? urpm::parallel::remove($urpm, - \@toremove, - test => $test, - force => $force, - noscripts => $urpm->{options}{noscripts}, - repackage => $urpm->{options}{repackage}, - ) - : urpm::install::install($urpm, - \@toremove, {}, {}, - test => $test, - force => $force, - noscripts => $urpm->{options}{noscripts}, - repackage => $urpm->{options}{repackage}, - ); + ? urpm::parallel::remove($urpm, \@toremove, %remove_options) + : urpm::install::install($urpm, \@toremove, {}, {}, %remove_options); if (@errors) { #- Warning : the following message is parsed in urpm::parallel_* |