summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 73b58d189..6ca56b3ca 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -192,10 +192,12 @@ sub allowNVIDIA_rpms {
if (pkgs::packageByName($packages, "NVIDIA_GLX")) {
#- at this point, we can allow using NVIDIA 3D acceleration packages.
my @rpms;
- foreach (qw(kernel kernel-smp kernel-entreprise kernel22 kernel22-smp kernel22-secure)) {
+ foreach (keys %{$packages->{names}}) {
+ my ($ext, $version, $release) = /kernel[^-]*(-smp|-enterprise|-secure)?(?:-(\d.*?)\.(\d+mdk))?$/ or next;
my $p = pkgs::packageByName($packages, $_);
pkgs::packageSelectedOrInstalled($p) or next;
- my $name = "NVIDIA_kernel-" . pkgs::packageVersion($p) . "-" . pkgs::packageRelease($p) . (/(-.*)/ && $1);
+ $version or ($version, $release) = (pkgs::packageVersion($p), pkgs::packageRelease($p));
+ my $name = "NVIDIA_kernel-$version-$release$ext";
pkgs::packageByName($packages, $name) or return;
push @rpms, $name;
}