From 30497f09e6b376fd15b4ee443079add8bbebd33f Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 25 Apr 2001 10:59:13 +0000 Subject: added support for NVIDIA 3D acceleration which is only enabled if package are available in package list and match kernel version and release. --- perl-install/install_any.pm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'perl-install') diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 43ca44e37..034cafff1 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -192,6 +192,28 @@ sub clean_postinstall_rpms() { $postinstall_rpms and -d $postinstall_rpms and commands::rm('-rf', $postinstall_rpms); } + +#-###################################################################################### +#- Specific Hardware to take into account and associated rpms to install +#-###################################################################################### +sub allowNVIDIA_rpms { + my ($packages) = @_; + require pkgs; + 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)) { + my $p = pkgs::packageByName($packages, $_); + pkgs::packageSelectedOrInstalled($p) or next; + my $name = "NVIDIA_kernel-" . pkgs::packageVersion($p) . "-" . pkgs::packageRelease($p) . (/(-.*)/ && $1); + pkgs::packageByName($packages, $name) or return; + push @rpms, $name; + } + @rpms > 0 or return; + return [ @rpms, "NVIDIA_GLX" ]; + } +} + #-###################################################################################### #- Functions #-###################################################################################### -- cgit v1.2.1