aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/formatting.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-17 15:54:32 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-17 15:54:32 +0000
commit36da7af73a859913e96e8dcee362a9b64c88e896 (patch)
tree52fbd7dd175d745213257d316282cbef69f5a8c7 /Rpmdrake/formatting.pm
parenta3a01f4ee06aa9df8dcdaaf30cf9e27f3049e55d (diff)
downloadrpmdrake-36da7af73a859913e96e8dcee362a9b64c88e896.tar
rpmdrake-36da7af73a859913e96e8dcee362a9b64c88e896.tar.gz
rpmdrake-36da7af73a859913e96e8dcee362a9b64c88e896.tar.bz2
rpmdrake-36da7af73a859913e96e8dcee362a9b64c88e896.tar.xz
rpmdrake-36da7af73a859913e96e8dcee362a9b64c88e896.zip
(pkg2medium) reuse URPM::pkg2media()
Diffstat (limited to 'Rpmdrake/formatting.pm')
-rw-r--r--Rpmdrake/formatting.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm
index 0da48a43..700ef317 100644
--- a/Rpmdrake/formatting.pm
+++ b/Rpmdrake/formatting.pm
@@ -70,12 +70,8 @@ sub urpm_name {
sub pkg2medium {
my ($p, $urpm) = @_;
- my $id = $p->id;
- return { name => N("None") } if !$id;
- foreach (@{$urpm->{media}}) {
- !$_->{ignore} && $id >= $_->{start} && $id <= $_->{end} and return $_;
- }
- undef;
+ return { name => N("None") } if !$p->id; # if installed
+ URPM::pkg2media($urpm->{media}, $p) || undef;
}
#- strftime returns a string in the locale charset encoding;