diff options
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/open_db.pm | 1 | ||||
-rw-r--r-- | Rpmdrake/pkg.pm | 10 |
2 files changed, 8 insertions, 3 deletions
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; |