summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install/pkgs.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index ee3c83b54..91a57c2cf 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -125,13 +125,14 @@ sub packagesProviding {
grep { $_->is_arch_compat } URPM::packages_providing($packages, $name);
}
-#- search package with given name and compatible with current architecture.
+#- search package with given name (and optional ISA) and compatible with current architecture.
#- take the best one found (most up-to-date).
# FIXME: reuse urpmi higher level code instead!
sub packageByName {
my ($packages, $name) = @_;
- my @l = sort { $b->id <=> $a->id } grep { $_->name eq $name } packagesProviding($packages, $name);
+ my $basename = $name =~ s/\(x86-..\)$//r;
+ my @l = sort { $b->id <=> $a->id } grep { $_->name eq $basename } packagesProviding($packages, $name);
my $best;
foreach (@l) {