summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-14 11:22:02 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-14 11:22:02 +0000
commite53d7f7f7c022419c24518dcd63b9984874c0dc5 (patch)
treebeabbf52e1ba86246179ace03970c8be02719e5b /perl-install/bootloader.pm
parent915ea664660f1c7443f770350414a205c007fd11 (diff)
downloaddrakx-backup-do-not-use-e53d7f7f7c022419c24518dcd63b9984874c0dc5.tar
drakx-backup-do-not-use-e53d7f7f7c022419c24518dcd63b9984874c0dc5.tar.gz
drakx-backup-do-not-use-e53d7f7f7c022419c24518dcd63b9984874c0dc5.tar.bz2
drakx-backup-do-not-use-e53d7f7f7c022419c24518dcd63b9984874c0dc5.tar.xz
drakx-backup-do-not-use-e53d7f7f7c022419c24518dcd63b9984874c0dc5.zip
perl_checker fixes
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm28
1 files changed, 11 insertions, 17 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 97fd85ba4..1240834a2 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -395,38 +395,32 @@ my $mdksub = "smp|enterprise|secure|linus|mosix|BOOT|custom";
sub sanitize_ver {
my $string = shift;
my $return;
- (my $ehad, my $chtaim, my $chaloch, my $arba, my $hamesh, my $chech); #where that names come from ;)
+ my ($ehad, $chtaim, $chaloch, $arba, $hamesh, $chech); #where that names come from ;)
- $string =~ m|([^-]+)-([^-]+)(-([^-]+))?(-([^-]*))?|;
- $ehad = $1; $chtaim = $2; $chaloch = $3; $arba = $4; $hamesh = $5; $chech = $6;
+ if ($string =~ m|([^-]+)-([^-]+)(-([^-]+))?(-([^-]*))?|) {
+ $ehad = $1; $chtaim = $2; $chaloch = $3; $arba = $4; $hamesh = $5; $chech = $6;
+ }
if ($chtaim =~ m|mdk| && $chech =~ m|mdk(${mdksub})|) { #new mdk with mdksub
my $s = $1;
- $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)\.(\d+)mdk|;
- $return = "$1$2$3-$4$s";
+ $return = "$1$2$3-$4$s" if $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)\.(\d+)mdk|;
} elsif ($chaloch =~ m|mdk| && $chtaim =~ /pre\d+/
&& $arba =~ m|(\d+)mdk(${mdksub})?|) { #new mdk with mdksub
my $r = $1;
my $s = $2 ? $2 : "";
- $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)pre(\d+)|;
- $return = "$1$2$3-p$4$r$s";
+ $return = "$1$2$3-p$4$r$s" if $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)pre(\d+)|;
} elsif ($chtaim =~ m|mdk$|) { #new mdk
- $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)\.(\d+)mdk$|;
- $return = "$1$2$3-$4";
+ $return = "$1$2$3-$4" if $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)\.(\d+)mdk$|;
} elsif ($chaloch =~ m|(\d+)mdk(${mdksub})$|) { #old mdk with mdksub
my $s = "$1$2";
- $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)|;
- $return = "$1$2$3-$s";
+ $return = "$1$2$3-$s" if $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)|;
} elsif ($chaloch =~ m|(\d+)mdk$|) { #old mdk
my $s = $1;
- $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)|;
- $return = "$1$2$3-$s";
+ $return = "$1$2$3-$s" if $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)|;
} elsif (!defined($chaloch)) { #linus/marcelo vanilla
- $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)$|;
- $return = "$1$2$3";
+ $return = "$1$2$3" if $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)$|;
} else { #a pre ac vanilla or whatever with EXTRAVERSION
- $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)$|;
- $return = "$1$2$3${chaloch}";
+ $return = "$1$2$3${chaloch}" if $chtaim =~ m|^(\d+)\.(\d+)\.(\d+)$|;
}
$return =~ s|\.||g; $return =~ s|mdk||; $return =~ s|secure|sec|; $return =~ s|enterprise|ent|;
return $return;