summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-03 08:59:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-03 08:59:46 +0000
commit5234de9b98ef147c8533b2829cb5083c45e46b46 (patch)
treeb48cbfceece95043815ab652d0307528fbdaf783 /urpm
parent1be3440bc78cb655eeb7b4efabb0f8a23734e2ea (diff)
downloadurpmi-5234de9b98ef147c8533b2829cb5083c45e46b46.tar
urpmi-5234de9b98ef147c8533b2829cb5083c45e46b46.tar.gz
urpmi-5234de9b98ef147c8533b2829cb5083c45e46b46.tar.bz2
urpmi-5234de9b98ef147c8533b2829cb5083c45e46b46.tar.xz
urpmi-5234de9b98ef147c8533b2829cb5083c45e46b46.zip
factorize options handling
Diffstat (limited to 'urpm')
-rw-r--r--urpm/install.pm14
-rw-r--r--urpm/main_loop.pm8
2 files changed, 15 insertions, 7 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},