aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-26 18:21:38 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-26 18:21:38 +0000
commit584e87663263b850c4a35247a762da1bf31cd90f (patch)
tree45480e4d21770ab34e28eec9deec50c658ae3f6c
parentf3f66a027365956353355a9dd81aa0932c8840b5 (diff)
downloadrpmdrake-584e87663263b850c4a35247a762da1bf31cd90f.tar
rpmdrake-584e87663263b850c4a35247a762da1bf31cd90f.tar.gz
rpmdrake-584e87663263b850c4a35247a762da1bf31cd90f.tar.bz2
rpmdrake-584e87663263b850c4a35247a762da1bf31cd90f.tar.xz
rpmdrake-584e87663263b850c4a35247a762da1bf31cd90f.zip
(get_pkgs,get_updates_list) fix offering of updates from media not configured as update ones
(inspirated by mdv)
-rw-r--r--NEWS1
-rw-r--r--Rpmdrake/open_db.pm1
-rw-r--r--Rpmdrake/pkg.pm10
3 files changed, 9 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index c1d8ab39..650cd61f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
- rpmdrake:
o display backported packages with a different icon
+ o fix offering of updates from media not configured as update ones
Version 5.31 - 20 March 2012, Thierry Vignaud
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index cd52e042..86b95be1 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -150,7 +150,6 @@ sub open_urpmi_db {
my $urpm = fast_open_urpmi_db();
my $media = ref $::rpmdrake_options{media} ? join(',', @{$::rpmdrake_options{media}}) : '';
- # FIXME: this is bogus and pulls backports as updates:
my $searchmedia = $urpmi_options{update} ? undef : join(',', get_inactive_backport_media($urpm));
$urpm->{lock} = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock}) if !$::env;
my $previous = $::rpmdrake_options{'previous-priority-upgrade'};
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 66b09b08..b8c8a690 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -375,12 +375,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 = (
@@ -500,7 +501,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;