summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-02 09:31:51 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-02 09:31:51 +0000
commit116d62d583f40b68871120ae6bb65aaf0836fd2a (patch)
tree76c0c10f846148c0b0649494817680bae05ceffb
parent01bbdf3cd5876020eeca86f3a00c505a8abafd9d (diff)
downloadurpmi-116d62d583f40b68871120ae6bb65aaf0836fd2a.tar
urpmi-116d62d583f40b68871120ae6bb65aaf0836fd2a.tar.gz
urpmi-116d62d583f40b68871120ae6bb65aaf0836fd2a.tar.bz2
urpmi-116d62d583f40b68871120ae6bb65aaf0836fd2a.tar.xz
urpmi-116d62d583f40b68871120ae6bb65aaf0836fd2a.zip
Factorize options
-rwxr-xr-xurpmi28
1 files changed, 13 insertions, 15 deletions
diff --git a/urpmi b/urpmi
index 0b1f25c2..01f2bce9 100755
--- a/urpmi
+++ b/urpmi
@@ -613,14 +613,19 @@ foreach my $set (@{$state->{transaction} || []}) {
message(N("removing %s", join(' ', @{!$urpm->{options}{'allow-force'} && $set->{remove} || []})));
log_it(scalar localtime, " ", join(' ', values %transaction_sources_install, values %transaction_sources), "\n");
$urpm->{log}("starting installing packages");
+ my %install_options_common = (
+ test => $test,
+ excludepath => $urpm->{options}{excludepath},
+ excludedocs => $urpm->{options}{excludedocs},
+ post_clean_cache => $urpm->{options}{'post-clean'},
+ translate_message => 1,
+ oldpackage => $state->{oldpackage},
+ );
my @l = $urpm->install(
!$urpm->{options}{'allow-force'} && $set->{remove} || [],
\%transaction_sources_install, \%transaction_sources,
'fork' => @{$state->{transaction} || []} > 1, #- fork if multiple transaction
- translate_message => 1,
- oldpackage => $state->{oldpackage}, post_clean_cache => $urpm->{options}{'post-clean'},
- test => $test,
- excludepath => $urpm->{options}{excludepath}, excludedocs => $urpm->{options}{excludedocs},
+ %install_options_common,
);
if (@l) {
message(N("Installation failed") . ":\n" . join("\n", map { "\t$_" } @l));
@@ -637,11 +642,8 @@ foreach my $set (@{$state->{transaction} || []}) {
!$urpm->{options}{'allow-force'} && $set->{remove} || [],
\%transaction_sources_install, \%transaction_sources,
'fork' => @{$state->{transaction} || []} > 1, #- fork if multiple transaction
- translate_message => 1, nodeps => 1,
- oldpackage => $state->{oldpackage}, post_clean_cache => $urpm->{options}{'post-clean'},
- test => $test,
- excludepath => $urpm->{options}{excludepath},
- excludedocs => $urpm->{options}{excludedocs},
+ nodeps => 1,
+ %install_options_common,
);
if (@l) {
message(N("Installation failed") . ":\n" . join("\n", map { "\t$_" } @l));
@@ -656,12 +658,8 @@ foreach my $set (@{$state->{transaction} || []}) {
!$urpm->{options}{'allow-force'} && $set->{remove} || [],
\%transaction_sources_install, \%transaction_sources,
'fork' => @{$state->{transaction} || []} > 1, #- fork if multiple transaction
- translate_message => 1, nodeps => 1, force => 1,
- oldpackage => $state->{oldpackage},
- post_clean_cache => $urpm->{options}{'post-clean'},
- test => $test,
- excludepath => $urpm->{options}{excludepath},
- excludedocs => $urpm->{options}{excludedocs},
+ nodeps => 1, force => 1,
+ %install_options_common,
);
if (@l) {
message(N("Installation failed") . ":\n" . join("\n", map { "\t$_" } @l));