diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-12-13 15:30:09 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-12-13 15:30:09 +0000 |
commit | e27cf71d96b1cd6f571a3dd34e62dc7bb647ccda (patch) | |
tree | 7b99b752909e54867ddcf8b90b51e7492002a6ae | |
parent | 6835da23d036145775e54556bb36390aee1389c6 (diff) | |
download | urpmi-e27cf71d96b1cd6f571a3dd34e62dc7bb647ccda.tar urpmi-e27cf71d96b1cd6f571a3dd34e62dc7bb647ccda.tar.gz urpmi-e27cf71d96b1cd6f571a3dd34e62dc7bb647ccda.tar.bz2 urpmi-e27cf71d96b1cd6f571a3dd34e62dc7bb647ccda.tar.xz urpmi-e27cf71d96b1cd6f571a3dd34e62dc7bb647ccda.zip |
Small code factorization
-rwxr-xr-x | urpmi | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -643,8 +643,8 @@ foreach my $set (@{$state->{transaction} || []}) { } else { message(N("installing %s", join(' ', @packnames))); } - @{!$urpm->{options}{'allow-force'} && $set->{remove} || []} and - message(N("removing %s", join(' ', @{!$urpm->{options}{'allow-force'} && $set->{remove} || []}))); + my $to_remove = $urpm->{options}{'allow-force'} ? [] : ($set->{remove} || []); + @$to_remove and message(N("removing %s", "@$to_remove")); log_it(scalar localtime, " ", join(' ', values %transaction_sources_install, values %transaction_sources), "\n"); $urpm->{log}("starting installing packages"); my %install_options_common = ( @@ -658,7 +658,7 @@ foreach my $set (@{$state->{transaction} || []}) { noscripts => $urpm->{options}{noscripts}, ); my @l = $urpm->install( - !$urpm->{options}{'allow-force'} && $set->{remove} || [], + $to_remove, \%transaction_sources_install, \%transaction_sources, 'fork' => @{$state->{transaction} || []} > 1, #- fork if multiple transaction %install_options_common, @@ -676,7 +676,7 @@ foreach my $set (@{$state->{transaction} || []}) { $force && $yesexpr, boolean => 1) =~ /[$yesexpr]/ or ++$nok, next; $urpm->{log}("starting installing packages without deps"); @l = $urpm->install( - !$urpm->{options}{'allow-force'} && $set->{remove} || [], + $to_remove, \%transaction_sources_install, \%transaction_sources, 'fork' => @{$state->{transaction} || []} > 1, #- fork if multiple transaction nodeps => 1, @@ -693,7 +693,7 @@ foreach my $set (@{$state->{transaction} || []}) { $force && $yesexpr, boolean => 1) =~ /[$yesexpr]/ or ++$nok, next; $urpm->{log}("starting force installing packages without deps"); @l = $urpm->install( - !$urpm->{options}{'allow-force'} && $set->{remove} || [], + $to_remove, \%transaction_sources_install, \%transaction_sources, 'fork' => @{$state->{transaction} || []} > 1, #- fork if multiple transaction nodeps => 1, force => 1, |