summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/pkgs.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 76a5fde39..c6c3152c7 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -163,6 +163,18 @@ sub packageById {
my $pkg = $packages->{depslist}[$id]; #- do not log as id unsupported are still in depslist.
$pkg->is_arch_compat && $pkg;
}
+
+sub bestKernelPackage {
+ my ($packages) = @_;
+ my $best;
+
+ foreach ($packages->{provides}{kernel}) {
+ my $pkg = $packages->{depslist}[$_] or next;
+ $pkg->name =~ /kernel-\d/ or next;
+ !$best || $pkg->compare_pkg($best) > 0 and $best = $pkg;
+ }
+}
+
sub packagesOfMedium {
my ($packages, $medium) = @_;
$medium->{start} <= $medium->{end} ? @{$packages->{depslist}}[$medium->{start} .. $medium->{end}] : ();