diff options
author | Francois Pons <fpons@mandriva.com> | 2001-04-25 10:59:13 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-04-25 10:59:13 +0000 |
commit | 30497f09e6b376fd15b4ee443079add8bbebd33f (patch) | |
tree | 1db77016d53c5aca6b36e1c4d43d9178a9ee3c8d /perl-install/install_any.pm | |
parent | e7848cf476e0f1869a2e04ca2d395f25c6e44ede (diff) | |
download | drakx-backup-do-not-use-30497f09e6b376fd15b4ee443079add8bbebd33f.tar drakx-backup-do-not-use-30497f09e6b376fd15b4ee443079add8bbebd33f.tar.gz drakx-backup-do-not-use-30497f09e6b376fd15b4ee443079add8bbebd33f.tar.bz2 drakx-backup-do-not-use-30497f09e6b376fd15b4ee443079add8bbebd33f.tar.xz drakx-backup-do-not-use-30497f09e6b376fd15b4ee443079add8bbebd33f.zip |
added support for NVIDIA 3D acceleration which is only enabled if package are
available in package list and match kernel version and release.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 22 |
1 files changed, 22 insertions, 0 deletions
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 #-###################################################################################### |