aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrpmdrake7
1 files changed, 4 insertions, 3 deletions
diff --git a/rpmdrake b/rpmdrake
index b7309d58..68ef4817 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -318,9 +318,10 @@ sub parse_compssUsers_flat {
sub pkg2medium {
my ($p, $urpm) = @_;
- my $tmp;
- each_index { !$_->{ignore} && $p->id <= $_->{end} and $tmp ||= ${$urpm->{media}}[$::i] } @{$urpm->{media}};
- $tmp;
+ foreach ( @{$urpm->{media}} ) {
+ !$_->{ignore} && $p->id <= $_->{end} and return $_;
+ }
+ undef;
}
#- strftime returns a string in the locale charset encoding;