aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMandrivaUpdate2
-rw-r--r--NEWS2
-rw-r--r--Rpmdrake/gui.pm6
-rw-r--r--Rpmdrake/pkg.pm18
-rwxr-xr-xrpmdrake4
5 files changed, 20 insertions, 12 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate
index 7e670ec8..94c3e515 100755
--- a/MandrivaUpdate
+++ b/MandrivaUpdate
@@ -254,7 +254,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/NEWS b/NEWS
index 046c4f16..b2a0c8ed 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- Fix offering of updates from media not configured as update.
+
Version 5.26.6 - 7 Januar 2011, Per Øyvind Karlsen
- handle URPM::Package->fullname returning vector of different lengths (#61702)
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 1cd246d2..91e5b769 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -623,9 +623,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 = (
@@ -921,7 +921,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/pkg.pm b/Rpmdrake/pkg.pm
index a2f3e4d6..3bb3c6ff 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -210,7 +210,7 @@ sub download_callback {
my (@update_medias, $is_update_media_already_asked);
sub warn_about_media {
- my ($w, $opts) = @_;
+ my ($w, %opts) = @_;
return if $::MODE ne 'update';
return if $::rpmdrake_options{'no-media-update'};
@@ -228,7 +228,7 @@ sub warn_about_media {
$::rpmdrake_options{'no-media-update'} ||= 1;
if (@update_medias > 0) {
- if (!$opts->{skip_updating_mu} && !$is_update_media_already_asked) {
+ if (!$opts{skip_updating_mu} && !$is_update_media_already_asked) {
$is_update_media_already_asked = 1;
$::rpmdrake_options{'no-confirmation'} or interactive_msg(N("Confirmation"),
N("I need to contact the mirror to get latest update packages.
@@ -357,12 +357,13 @@ our $need_restart;
our $probe_only_for_updates;
sub get_updates_list {
- my ($urpm, $db, $state, $requested, $requested_list, $requested_strict, $all_pkgs) = @_;
+ my ($urpm, $db, $state, $requested, $requested_list, $requested_strict, $all_pkgs, %limit_preselect) = @_;
$urpm->request_packages_to_upgrade(
$db,
$state,
$requested,
+ %limit_preselect
);
my %common_opts = (
@@ -413,14 +414,14 @@ sub get_updates_list {
}
sub get_pkgs {
- my ($opts) = @_;
+ my (%options) = @_;
my $w = $::main_window;
my $gurpm = Rpmdrake::gurpm->new(1 ? N("Please wait") : N("Package installation..."), N("Initializing..."), transient => $::main_window);
my $_gurpm_clean_guard = before_leaving { undef $gurpm };
#my $_flush_guard = Gtk2::GUI_Update_Guard->new;
- warn_about_media($w, $opts);
+ warn_about_media($w, %options);
my $urpm = open_urpmi_db(update => $probe_only_for_updates && !is_it_a_devel_distro());
@@ -483,7 +484,12 @@ sub get_pkgs {
my (@requested, @requested_strict);
if ($compute_updates->[0] || $::MODE eq 'update') {
- get_updates_list($urpm, $db, $state, $requested, \@requested, \@requested_strict, \%all_pkgs);
+ my %filter;
+ if ($options{pure_updates}) {
+ # limit to packages from update-media (dependencies can still come from other media)
+ %filter = ( idlist => [map {$_->{start}..$_->{end}} @update_medias] );
+ }
+ get_updates_list($urpm, $db, $state, $requested, \@requested, \@requested_strict, \%all_pkgs, %filter);
}
$priority_state = $need_restart ? $state : undef;
diff --git a/rpmdrake b/rpmdrake
index 8f235e49..5b5570d1 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -518,7 +518,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}->();
@@ -757,7 +757,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;