diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-26 18:21:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-26 18:21:38 +0000 |
commit | 584e87663263b850c4a35247a762da1bf31cd90f (patch) | |
tree | 45480e4d21770ab34e28eec9deec50c658ae3f6c /Rpmdrake/pkg.pm | |
parent | f3f66a027365956353355a9dd81aa0932c8840b5 (diff) | |
download | rpmdrake-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)
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rw-r--r-- | Rpmdrake/pkg.pm | 10 |
1 files changed, 8 insertions, 2 deletions
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; |