summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-03 08:50:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-03 08:50:40 +0000
commit7f12a73d7c071e6625462d3867626ba00f283d2d (patch)
tree6287bed4acd3e06e24e555c9d0c9b88646841060
parent5c4c93817a7e059c87253f6e8a241e3d8c71fdcd (diff)
downloadurpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.tar
urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.tar.gz
urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.tar.bz2
urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.tar.xz
urpmi-7f12a73d7c071e6625462d3867626ba00f283d2d.zip
factorize code
-rw-r--r--urpme23
1 files changed, 9 insertions, 14 deletions
diff --git a/urpme b/urpme
index b0bd9ee6..acd81f3c 100644
--- a/urpme
+++ b/urpme
@@ -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_*