summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index da0a0d37a..4fdcd745d 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -103,6 +103,18 @@ sub add_users {
}
}
+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;
+}
+
sub install_bootloader_pkgs {
my ($do_pkgs, $b) = @_;