diff options
-rw-r--r-- | urpm/install.pm | 14 | ||||
-rw-r--r-- | urpm/main_loop.pm | 8 | ||||
-rw-r--r-- | urpme | 3 |
3 files changed, 16 insertions, 9 deletions
diff --git a/urpm/install.pm b/urpm/install.pm index f3eb971d..d56cb8ab 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -135,6 +135,20 @@ sub get_README_files { } } +sub options { + my ($urpm) = @_; + + ( + excludepath => $urpm->{options}{excludepath}, + excludedocs => $urpm->{options}{excludedocs}, + repackage => $urpm->{options}{repackage}, + post_clean_cache => $urpm->{options}{'post-clean'}, + nosize => $urpm->{options}{ignoresize}, + ignorearch => $urpm->{options}{ignorearch}, + noscripts => $urpm->{options}{noscripts}, + ); +} + #- install packages according to each hash (remove, install or upgrade). #- options: #- test, excludepath, nodeps, noorder (unused), delta, diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index f3e41411..5d7074e2 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -198,18 +198,12 @@ foreach my $set (@{$state->{transaction} || []}) { bug_log(scalar localtime(), " ", join(' ', values %transaction_sources_install, values %transaction_sources), "\n"); $urpm->{log}("starting installing packages"); my %install_options_common = ( + urpm::install::options($urpm), test => $test, verbose => $options{verbose}, - excludepath => $urpm->{options}{excludepath}, - excludedocs => $urpm->{options}{excludedocs}, - repackage => $urpm->{options}{repackage}, - post_clean_cache => $urpm->{options}{'post-clean'}, oldpackage => $state->{oldpackage}, justdb => $options{justdb}, replacepkgs => $options{replacepkgs}, - nosize => $urpm->{options}{ignoresize}, - ignorearch => $urpm->{options}{ignorearch}, - noscripts => $urpm->{options}{noscripts}, callback_inst => $callbacks->{inst}, callback_trans => $callbacks->{trans}, callback_report_uninst => $callbacks->{callback_report_uninst}, @@ -140,8 +140,7 @@ print N("removing %s", join(' ', sort @toremove)) . "\n"; my %remove_options = ( test => $test, force => $force, - noscripts => $urpm->{options}{noscripts}, - repackage => $urpm->{options}{repackage}, + urpm::install::options($urpm), ); my @errors = $parallel ? urpm::parallel::remove($urpm, \@toremove, %remove_options) |