diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-06-12 16:11:11 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-06-12 16:11:11 +0000 |
commit | fe9a1edcd22047e697751b71013d323efd69bdff (patch) | |
tree | 00f521a975d38082c7d696d05bf99a41609dba9e /Rpmdrake | |
parent | a84061ddccc993c4eb8f422361ea2b5b5166bef4 (diff) | |
download | rpmdrake-fe9a1edcd22047e697751b71013d323efd69bdff.tar rpmdrake-fe9a1edcd22047e697751b71013d323efd69bdff.tar.gz rpmdrake-fe9a1edcd22047e697751b71013d323efd69bdff.tar.bz2 rpmdrake-fe9a1edcd22047e697751b71013d323efd69bdff.tar.xz rpmdrake-fe9a1edcd22047e697751b71013d323efd69bdff.zip |
(pkg2medium) factorize: do not call URPM::Package->id() quite a lot of time
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-x | Rpmdrake/formatting.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm index e3de5fb5..5c404b0c 100755 --- a/Rpmdrake/formatting.pm +++ b/Rpmdrake/formatting.pm @@ -76,8 +76,9 @@ sub urpm_name { sub pkg2medium { my ($p, $urpm) = @_; + my $id = $p->id; foreach (@{$urpm->{media}}) { - !$_->{ignore} && $p->id <= $_->{end} and return $_; + !$_->{ignore} && $id >= $_->{start} && $id <= $_->{end} and return $_; } undef; } |