summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/media.pm10
-rw-r--r--urpm/select.pm12
2 files changed, 12 insertions, 10 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index cfc3ab8a..265ff667 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -592,13 +592,9 @@ sub _parse_media {
unless ($_->{ignore}) {
_check_after_reading_hdlist_or_synthesis($urpm, $_);
}
- unless ($_->{ignore}) {
- if ($_->{searchmedia}) {
- ($urpm->{searchmedia}{start}, $urpm->{searchmedia}{end}) = ($_->{start}, $_->{end});
- $urpm->{log}(N("Search start: %s end: %s",
- $urpm->{searchmedia}{start}, $urpm->{searchmedia}{end}));
- delete $_->{searchmedia};
- }
+ if ($_->{searchmedia}) {
+ $urpm->{searchmedia} = 1;
+ $urpm->{log}(N("Search start: %s end: %s", $_->{start}, $_->{end}));
}
}
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) = @_;