From 3ec02867e9927107d0444f2cb2f87c706fd67550 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 13 Feb 2008 08:47:26 +0000 Subject: (get_pkgs,open_urpmi_db) ignore disabled backport media in rpmdrake too, not just in MandrivaUpdate (#35009) --- Rpmdrake/open_db.pm | 2 +- Rpmdrake/pkg.pm | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'Rpmdrake') diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm index e8ff717b..9f9e45fa 100644 --- a/Rpmdrake/open_db.pm +++ b/Rpmdrake/open_db.pm @@ -95,7 +95,7 @@ sub open_urpmi_db { my $urpm = fast_open_urpmi_db(); my $media = ref $::rpmdrake_options{media} ? join(',', @{$::rpmdrake_options{media}}) : ''; - my $searchmedia = $urpmi_options{update} ? undef : join(',', get_inactive_backport_media($urpm)); + my $searchmedia = join(',', get_inactive_backport_media($urpm)); $urpm->{lock} = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock}); urpm::media::configure($urpm, media => $media, if_($searchmedia, searchmedia => $searchmedia), %urpmi_options); $urpm; diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 24da2c7c..9b32f4a4 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -406,6 +406,11 @@ sub get_pkgs { my $requested = {}; my $state = {}; + my (@requested, @requested_strict); + + { + local $urpm->{searchmedia} = undef; + $urpm->request_packages_to_upgrade( $db, $state, @@ -413,9 +418,9 @@ sub get_pkgs { ); # list of updates (including those matching /etc/urpmi/skip.list): - my @requested = sort map { urpm_name($_) } @{$urpm->{depslist}}[keys %$requested]; + @requested = sort map { urpm_name($_) } @{$urpm->{depslist}}[keys %$requested]; # list of pure updates (w/o those matching /etc/urpmi/skip.list but with their deps): - my @requested_strict = $probe_only_for_updates ? + @requested_strict = $probe_only_for_updates ? sort map { urpm_name($_); } $urpm->resolve_requested($db, $state, $requested, callback_choices => \&Rpmdrake::gui::callback_choices) @@ -423,6 +428,8 @@ sub get_pkgs { # list updates including skiped ones + their deps in MandrivaUpdate: push @requested, difference2(\@requested_strict, \@requested) if $probe_only_for_updates; + } + if (!$probe_only_for_updates) { $urpm->compute_installed_flags($db); # TODO/FIXME: not for updates $urpm->{depslist}[$_]->set_flag_installed foreach keys %$requested; #- pretend it's installed -- cgit v1.2.1