summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm7
1 files changed, 6 insertions, 1 deletions
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) {