summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-11-30 15:20:14 +0000
committerOlivier Blin <oblin@mandriva.com>2009-11-30 15:20:14 +0000
commitb32d30c6484eef71c0c51ddc0402316cce0ac945 (patch)
treeb6f2cfc767655a99416c62a9b9c44a9bd6fdcff8 /perl-install
parent33d6a389be59b1e3cbb0d76f0d12c24b8245fa39 (diff)
downloaddrakx-b32d30c6484eef71c0c51ddc0402316cce0ac945.tar
drakx-b32d30c6484eef71c0c51ddc0402316cce0ac945.tar.gz
drakx-b32d30c6484eef71c0c51ddc0402316cce0ac945.tar.bz2
drakx-b32d30c6484eef71c0c51ddc0402316cce0ac945.tar.xz
drakx-b32d30c6484eef71c0c51ddc0402316cce0ac945.zip
fix do_pkgs_during_install::what_provides
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/do_pkgs.pm1
-rw-r--r--perl-install/install/pkgs.pm7
2 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm
index f1241e5f1..a40eb66a7 100644
--- a/perl-install/do_pkgs.pm
+++ b/perl-install/do_pkgs.pm
@@ -163,7 +163,6 @@ sub install {
sub what_provides {
my ($do, $name) = @_;
- #- FIXME: install::pkgs::packagesProviding() is not implemented anymore
map { $_->name } install::pkgs::packagesProviding($do->{o}{packages}, $name);
}
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 6e01f37e8..088928489 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -81,12 +81,17 @@ sub size2time {
}
}
+sub packagesProviding {
+ my ($packages, $name) = @_;
+ grep { $_->is_arch_compat } URPM::packages_providing($packages, $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 } URPM::packages_providing($packages, $name);
+ my @l = grep { $_->name } eq $name packagesProviding($packages, $name);
my $best;
foreach (@l) {