summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-14 15:23:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-14 15:23:03 +0000
commit8e69642c2e7afd3f06a492f0e71df4964cdfd06a (patch)
treefd31d44bfadae2287e296d91ddf7d0eba34b3a23 /perl-install/install/pkgs.pm
parent09af6fc79715341c9847c51e6ed342eafe5c8497 (diff)
downloaddrakx-8e69642c2e7afd3f06a492f0e71df4964cdfd06a.tar
drakx-8e69642c2e7afd3f06a492f0e71df4964cdfd06a.tar.gz
drakx-8e69642c2e7afd3f06a492f0e71df4964cdfd06a.tar.bz2
drakx-8e69642c2e7afd3f06a492f0e71df4964cdfd06a.tar.xz
drakx-8e69642c2e7afd3f06a492f0e71df4964cdfd06a.zip
cleanup: use URPM::packages_providing()
Diffstat (limited to 'perl-install/install/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm10
1 files changed, 2 insertions, 8 deletions
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 4381d3d91..c71312b4d 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -109,18 +109,12 @@ sub size2time {
}
}
-
-sub packagesProviding {
- my ($packages, $name) = @_;
- map { $packages->{depslist}[$_] } keys %{$packages->{provides}{$name} || {}};
-}
-
#- search package with given name and compatible with current architecture.
#- take the best one found (most up-to-date).
sub packageByName {
my ($packages, $name) = @_;
- my @l = grep { $_->is_arch_compat && $_->name eq $name } packagesProviding($packages, $name);
+ my @l = grep { $_->is_arch_compat && $_->name eq $name } URPM::packages_providing($packages, $name);
my $best;
foreach (@l) {
@@ -203,7 +197,7 @@ sub packageCallbackChoices_ {
my $version = quotemeta($1);
find {
$_->name =~ /-$version$/ && ($_->flag_installed || $_->flag_selected);
- } packagesProviding($urpm, 'kernel');
+ } $urpm->packages_providing('kernel');
} elsif ($_->name =~ /(kernel-.*)-devel-(.*)/) {
my $kernel = "$1-$2";
my $p = packageByName($urpm, $kernel);