summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-09-22 15:05:34 +0000
committerFrancois Pons <fpons@mandriva.com>2003-09-22 15:05:34 +0000
commite5d23606ec38242ae60b464481f6522ed9d3ed9f (patch)
treec20c2df0d77def99d22ea1122d86428be92b5a0a
parenta3d7710e7279bc538a286956ce95b957799af701 (diff)
downloaddrakx-backup-do-not-use-e5d23606ec38242ae60b464481f6522ed9d3ed9f.tar
drakx-backup-do-not-use-e5d23606ec38242ae60b464481f6522ed9d3ed9f.tar.gz
drakx-backup-do-not-use-e5d23606ec38242ae60b464481f6522ed9d3ed9f.tar.bz2
drakx-backup-do-not-use-e5d23606ec38242ae60b464481f6522ed9d3ed9f.tar.xz
drakx-backup-do-not-use-e5d23606ec38242ae60b464481f6522ed9d3ed9f.zip
simplified code.
-rw-r--r--perl-install/pkgs.pm10
1 files 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 {