summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-07-27 10:27:02 +0000
committerThierry Vignaud <tv@mageia.org>2011-07-27 10:27:02 +0000
commit7747ee1f6f2a7f21c089b3b1d28c31bdc6bc58f9 (patch)
tree69b47763fbbdab70dcfa3a13d5528cd990a15858 /perl-install/bootloader.pm
parentda65e2b625f7fadc173a6699c2622cc241f08be0 (diff)
downloaddrakx-7747ee1f6f2a7f21c089b3b1d28c31bdc6bc58f9.tar
drakx-7747ee1f6f2a7f21c089b3b1d28c31bdc6bc58f9.tar.gz
drakx-7747ee1f6f2a7f21c089b3b1d28c31bdc6bc58f9.tar.bz2
drakx-7747ee1f6f2a7f21c089b3b1d28c31bdc6bc58f9.tar.xz
drakx-7747ee1f6f2a7f21c089b3b1d28c31bdc6bc58f9.zip
move bootloader::cmp_kernel_versions() from bootloader to any for drakx-net (#1266)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm16
1 files changed, 2 insertions, 14 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index d5c6180f4..e9cd86b7c 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -653,18 +653,6 @@ sub _do_the_symlink {
or cp_af("$::prefix/boot/$long_name", "$::prefix$link");
}
-sub cmp_kernel_versions {
- my ($va, $vb) = @_;
- my $rel_a = $va =~ s/-(.*)$// && $1;
- my $rel_b = $vb =~ s/-(.*)$// && $1;
- ($va, $vb) = map { [ split /[.-]/ ] } $va, $vb;
- my $r = 0;
- mapn_ {
- $r ||= $_[0] <=> $_[1];
- } $va, $vb;
- $r || $rel_a <=> $rel_b || $rel_a cmp $rel_b;
-}
-
# for lilo & xen
sub get_mbootpack_filename {
my ($entry) = @_;
@@ -725,7 +713,7 @@ sub add_kernel {
#- perImageAppend contains resume=/dev/xxx which we don't want
@$dict = grep { $_->[0] ne 'resume' } @$dict;
}
- if (-e "$::prefix/sbin/udev" && cmp_kernel_versions($kernel_str->{version_no_ext}, '2.6.8') >= 0) {
+ if (-e "$::prefix/sbin/udev" && any::cmp_kernel_versions($kernel_str->{version_no_ext}, '2.6.8') >= 0) {
log::l("it is a recent kernel, so we remove any existing devfs= kernel option to enable udev");
@$dict = grep { $_->[0] ne 'devfs' } @$dict;
}
@@ -920,7 +908,7 @@ sub get_kernel_labels {
my ($kernels, $b_prefer_24) = @_;
my @kernels_str =
- sort { cmp_kernel_versions($b->{version_no_ext}, $a->{version_no_ext}) }
+ sort { any::cmp_kernel_versions($b->{version_no_ext}, $a->{version_no_ext}) }
grep { -d "$::prefix/lib/modules/$_->{version}" }
map { vmlinuz2kernel_str($_) } @$kernels;