From e5d23606ec38242ae60b464481f6522ed9d3ed9f Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 22 Sep 2003 15:05:34 +0000 Subject: simplified code. --- perl-install/pkgs.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 0e2158870..8037c9fa2 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -165,16 +165,16 @@ sub packageById { sub bestKernelPackage { my ($packages) = @_; - my ($best, $best2); + my ($best, $best2, $best3); foreach (keys %{$packages->{provides}{kernel}}) { my $pkg = $packages->{depslist}[$_] or next; - $pkg->name =~ /kernel-\d/ and $best = $pkg, last; - $pkg->name =~ /kernel-i686/ and $best = $pkg; - $pkg->name =~ /kernel-enterprise/ and $best2 = $pkg; + $pkg->name =~ /kernel-\d/ and $best = $pkg; + $pkg->name =~ /kernel-i686/ and $best2 = $pkg; + $pkg->name =~ /kernel-enterprise/ and $best3 = $pkg; } - $best || $best2; + $best || $best2 || $best3; } sub packagesOfMedium { -- cgit v1.2.1