diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-12-22 12:51:39 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-12-22 12:51:39 +0000 |
commit | bb3c90ae7fa314898efa60048ada8bfeef35f078 (patch) | |
tree | 7abbec39c818e0bea285e38d17165392352d711a | |
parent | e47c818be52fc8efcfbe452f0c17135b153bb6bd (diff) | |
download | rpmdrake-bb3c90ae7fa314898efa60048ada8bfeef35f078.tar rpmdrake-bb3c90ae7fa314898efa60048ada8bfeef35f078.tar.gz rpmdrake-bb3c90ae7fa314898efa60048ada8bfeef35f078.tar.bz2 rpmdrake-bb3c90ae7fa314898efa60048ada8bfeef35f078.tar.xz rpmdrake-bb3c90ae7fa314898efa60048ada8bfeef35f078.zip |
Optimize pkg2medium function, by Ian D. Allen (bug #12769)
-rwxr-xr-x | rpmdrake | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |