diff options
Diffstat (limited to 'urpm/select.pm')
-rw-r--r-- | urpm/select.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/urpm/select.pm b/urpm/select.pm index 645105fa..ddf04ea6 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -47,12 +47,18 @@ sub _findindeps { sub pkg_in_searchmedia { my ($urpm, $pkg) = @_; - $urpm->{searchmedia}{start} <= $pkg->id - && $urpm->{searchmedia}{end} >= $pkg->id; + foreach my $medium (grep { $_->{searchmedia} } @{$urpm->{media}}) { + $medium->{start} <= $pkg->id + && $medium->{end} >= $pkg->id and return 1; + } + 0; } sub searchmedia_idlist { my ($urpm) = @_; - $urpm->{searchmedia} && [ $urpm->{searchmedia}{start} .. $urpm->{searchmedia}{end} ]; + $urpm->{searchmedia} && [ + map { $_->{start} .. $_->{end} } + grep { $_->{searchmedia} } @{$urpm->{media}} + ]; } sub build_listid_ { my ($urpm) = @_; |