From 8f5a440b8705732e2dd221cab769c1d796ba4338 Mon Sep 17 00:00:00 2001 From: Arnaud Patard Date: Mon, 30 Apr 2012 07:59:04 +0000 Subject: - packageByName: make sure to return the installed noarch rpm if any. --- perl-install/install/pkgs.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perl-install/install') diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index 9fd8b8f09..c4c1a7edc 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -123,7 +123,11 @@ sub packageByName { my $best; foreach (@l) { if ($best && $best != $_) { - $_->compare_pkg($best) > 0 and $best = $_; + if ($best->fullname eq $_->fullname) { + $best = $_ if $_->flag_installed; + } else { + $_->compare_pkg($best) > 0 and $best = $_; + } } else { $best = $_; } -- cgit v1.2.1