summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-03-08 15:02:04 +0000
committerFrancois Pons <fpons@mandriva.com>2002-03-08 15:02:04 +0000
commit8571bb3cd5e1c0a433fd70bfcff2c3f6ae0f91e9 (patch)
tree1dddf0028695cb92c0c5c915146e67218cdab8e7 /perl-install/install_any.pm
parent7f0054000011203df933d7a18146f1bfbdd390fa (diff)
downloaddrakx-8571bb3cd5e1c0a433fd70bfcff2c3f6ae0f91e9.tar
drakx-8571bb3cd5e1c0a433fd70bfcff2c3f6ae0f91e9.tar.gz
drakx-8571bb3cd5e1c0a433fd70bfcff2c3f6ae0f91e9.tar.bz2
drakx-8571bb3cd5e1c0a433fd70bfcff2c3f6ae0f91e9.tar.xz
drakx-8571bb3cd5e1c0a433fd70bfcff2c3f6ae0f91e9.zip
fixed allowNVIDIA_rpms to take care of new kernel naming conventions.
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;
}