aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-26 18:21:31 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-26 18:21:31 +0000
commit2485367155e9a7d4a4efa5a019b731c3390b3ddf (patch)
tree6a78143c79aacc27d95cc8127b6b5b30d8b440ab
parent9b0ae66578c22ffee2d97a82282f0bc2fbcf0038 (diff)
downloadrpmdrake-2485367155e9a7d4a4efa5a019b731c3390b3ddf.tar
rpmdrake-2485367155e9a7d4a4efa5a019b731c3390b3ddf.tar.gz
rpmdrake-2485367155e9a7d4a4efa5a019b731c3390b3ddf.tar.bz2
rpmdrake-2485367155e9a7d4a4efa5a019b731c3390b3ddf.tar.xz
rpmdrake-2485367155e9a7d4a4efa5a019b731c3390b3ddf.zip
(pkgs_provider) simplfy: only pass one hash of options
(inspirated from mdv)
-rwxr-xr-xMageiaUpdate2
-rw-r--r--Rpmdrake/gui.pm6
-rwxr-xr-xrpmdrake4
3 files changed, 6 insertions, 6 deletions
diff --git a/MageiaUpdate b/MageiaUpdate
index 91b6de99..4cfe8fec 100755
--- a/MageiaUpdate
+++ b/MageiaUpdate
@@ -256,7 +256,7 @@ sub run_treeview_dialog {
$filter->[0] = 'all'; # default filter: availlable updates
$Rpmdrake::pkg::probe_only_for_updates = 1; # faster startup
- pkgs_provider({}, 'all_updates', pure_updates => 1); # default mode
+ pkgs_provider('all_updates', pure_updates => 1); # default mode
refresh_packages_list($list, $info, $update_button);
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index e65811de..6a667751 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -624,9 +624,9 @@ sub is_updatable {
}
sub pkgs_provider {
- my ($options, $mode, %options) = @_;
+ my ($mode, %options) = @_;
return if !$mode;
- my $h = &get_pkgs($options); # was given (1, @_) for updates
+ my $h = &get_pkgs(\%options);
($urpm, $descriptions) = @$h{qw(urpm update_descr)};
$pkgs = $h->{all_pkgs};
%filters = (
@@ -923,7 +923,7 @@ Do you really want to install all the selected packages?"), yesno => 1)
my $res = $callback_action->($urpm, $pkgs);
if (!$res) {
$force_rebuild = 1;
- pkgs_provider({ skip_updating_mu => 1 }, $options->{tree_mode}, if_($Rpmdrake::pkg::probe_only_for_updates, pure_updates => 1));
+ pkgs_provider($options->{tree_mode}, if_($Rpmdrake::pkg::probe_only_for_updates, pure_updates => 1), skip_updating_mu => 1);
reset_search();
$size_selected = 0;
(undef, $size_free) = MDK::Common::System::df('/usr');
diff --git a/rpmdrake b/rpmdrake
index 2f3419a7..31700da0 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -519,7 +519,7 @@ sub run_treeview_dialog {
my $reload_db_and_clear_all = sub {
slow_func($w->{real_window}->window, sub {
$force_rebuild = 1;
- pkgs_provider({ skip_updating_mu => 1 }, $options->{tree_mode});
+ pkgs_provider($options->{tree_mode}, skip_updating_mu => 1);
reset_search();
$size_selected = 0;
$options->{rebuild_tree}->();
@@ -758,7 +758,7 @@ sub run_treeview_dialog {
$detail_list->realize;
gtkflush();
- slow_func($::main_window->window, sub { pkgs_provider({}, $default_list_mode) }); # default mode
+ slow_func($::main_window->window, sub { pkgs_provider($default_list_mode) }); # default mode
if (@initial_selection) {
$options->{initial_selection} = \@initial_selection;
$pkgs->{$_}{selected} = 0 foreach @initial_selection;