summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-09-22 15:04:54 +0000
committerFrancois Pons <fpons@mandriva.com>2003-09-22 15:04:54 +0000
commita3d7710e7279bc538a286956ce95b957799af701 (patch)
treea9db3a7103c4127bc7f5f3fea3f2cd333f7834c7
parentb6a175623b4fd173c45fc9f0503065ffe38d70ea (diff)
downloaddrakx-backup-do-not-use-a3d7710e7279bc538a286956ce95b957799af701.tar
drakx-backup-do-not-use-a3d7710e7279bc538a286956ce95b957799af701.tar.gz
drakx-backup-do-not-use-a3d7710e7279bc538a286956ce95b957799af701.tar.bz2
drakx-backup-do-not-use-a3d7710e7279bc538a286956ce95b957799af701.tar.xz
drakx-backup-do-not-use-a3d7710e7279bc538a286956ce95b957799af701.zip
use kernel-i686 or kernel-enterprise as other kernel.
-rw-r--r--perl-install/pkgs.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index b8cb2b1c1..0e2158870 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -165,15 +165,16 @@ sub packageById {
sub bestKernelPackage {
my ($packages) = @_;
- my $best;
+ my ($best, $best2);
foreach (keys %{$packages->{provides}{kernel}}) {
my $pkg = $packages->{depslist}[$_] or next;
- $pkg->name =~ /kernel-\d/ or next;
- !$best || $pkg->compare_pkg($best) > 0 and $best = $pkg;
+ $pkg->name =~ /kernel-\d/ and $best = $pkg, last;
+ $pkg->name =~ /kernel-i686/ and $best = $pkg;
+ $pkg->name =~ /kernel-enterprise/ and $best2 = $pkg;
}
- $best;
+ $best || $best2;
}
sub packagesOfMedium {