diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-11-09 09:56:34 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-11-09 09:56:34 +0000 |
commit | 01cc16b6174ef4b9ddc74725304478efeb708b52 (patch) | |
tree | 962d7b282d0ee21a38a500afdc8aaef12ea1d9b2 /perl-install | |
parent | 3e8f926a6517507d70129581b626277d6b33ded1 (diff) | |
download | drakx-backup-do-not-use-01cc16b6174ef4b9ddc74725304478efeb708b52.tar drakx-backup-do-not-use-01cc16b6174ef4b9ddc74725304478efeb708b52.tar.gz drakx-backup-do-not-use-01cc16b6174ef4b9ddc74725304478efeb708b52.tar.bz2 drakx-backup-do-not-use-01cc16b6174ef4b9ddc74725304478efeb708b52.tar.xz drakx-backup-do-not-use-01cc16b6174ef4b9ddc74725304478efeb708b52.zip |
create _sanitize_ver() for future changes in kernel_str2label()
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 478a20a94..605712975 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -86,7 +86,7 @@ sub kernel_str2label { my ($kernel, $o_use_long_name) = @_; my $base = $kernel->{basename} eq 'vmlinuz' ? 'linux' : $kernel->{basename}; $o_use_long_name || $kernel->{use_long_name} ? - sanitize_ver($base, $kernel) : $base; + _sanitize_ver($kernel) : $base; } sub get { @@ -851,10 +851,18 @@ sub short_ext { $short_ext || $kernel_str->{ext}; } -sub sanitize_ver { - my ($name, $kernel_str) = @_; - $name = '' if $name eq 'linux'; +# deprecated, only for compatibility (nov 2007) +sub sanitize_ver { + my ($_name, $kernel_str) = @_; + _sanitize_ver($kernel_str); +} + +sub _sanitize_ver { + my ($kernel_str) = @_; + + my $name = $kernel_str->{basename}; + $name = '' if $name eq 'vmlinuz'; my $v = $kernel_str->{version_no_ext}; if ($v =~ s/-\d+\.mm\././) { |