summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/XFdrake
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-06 15:57:08 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-06 15:57:08 +0000
commit3da20c7f7ffa3f082f7ee2193d5262dd4cae813e (patch)
tree37bed505d7ab7ef83660277956891f9fa9ab6ed7 /perl-install/standalone/XFdrake
parent1e7737e67bad7aae2c2541202bdbeb5301a81859 (diff)
downloaddrakx-3da20c7f7ffa3f082f7ee2193d5262dd4cae813e.tar
drakx-3da20c7f7ffa3f082f7ee2193d5262dd4cae813e.tar.gz
drakx-3da20c7f7ffa3f082f7ee2193d5262dd4cae813e.tar.bz2
drakx-3da20c7f7ffa3f082f7ee2193d5262dd4cae813e.tar.xz
drakx-3da20c7f7ffa3f082f7ee2193d5262dd4cae813e.zip
moved prioprietary NVIDIA code support to generic prioprietary support in standalone.pm.
Diffstat (limited to 'perl-install/standalone/XFdrake')
-rwxr-xr-xperl-install/standalone/XFdrake39
1 files changed, 2 insertions, 37 deletions
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index 5a4b923c2..2727a149f 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -41,7 +41,8 @@ $configure_this ||= 'everything';
modules::mergein_conf('/etc/modules.conf') if -r '/etc/modules.conf';
my $rc = do {
- my $options = { allowNVIDIA_rpms => allowNVIDIA_rpms(), allowFB => listlength(cat_("/proc/fb")) };
+ my $options = { allowNVIDIA_rpms => $in->do_pkgs->check_kernel_module_packages('NVIDIA_kernel-', 'NVIDIA_GLX'),
+ allowFB => listlength(cat_("/proc/fb")) };
if ($configure_this eq 'everything') {
check_XFree($in);
@@ -75,42 +76,6 @@ sub check_XFree {
system("mount /proc 2>/dev/null"); # ensure /proc is mounted for pci probing
}
-sub allowNVIDIA_rpms {
- my $allowNVIDIA_rpms;
- my (%list, %select);
-
- eval {
- local *_;
- require urpm;
- my $urpm = new urpm;
- $urpm->read_config(nocheck_access => 1);
- foreach (grep { !$_->{ignore} } @{$urpm->{media} || []}) {
- $urpm->parse_synthesis($_);
- }
- foreach (@{$urpm->{depslist} || []}) {
- $_->name =~ /NVIDIA/ and $list{$_->name} = 1;
- }
- };
- if ($list{NVIDIA_GLX}) {
- eval {
- my ($version, $release, $ext) = c::kernel_version() =~ /([^-]*)-([^-]*mdk)(\S*)/;
- $ext and $ext = "-$ext";
- $list{"NVIDIA_kernel-$version-$release$ext"} or die "no NVIDIA kernel for current kernel";
- $select{"NVIDIA_kernel-$version-$release$ext"} = 1;
- foreach (`rpm -qa kernel-2* kernel-smp-2* kernel-enterprise-2* kernel-secure-2* kernel kernel-smp kernel-entreprise kernel22 kernel22-smp kernel22-secure`) {
- ($ext, $version, $release) = /kernel[^-]*(-\D[^-]*)-([^-]*)-([^-]*mdk)?/;
- $release or ($version, $release) = $version =~ /(.*?)\.(\d+mdk)/;
- $list{"NVIDIA_kernel-$version-$release$ext"} and $select{"NVIDIA_kernel-$version-$release$ext"} = 1;
- }
- $allowNVIDIA_rpms = [ keys(%select), "NVIDIA_GLX" ];
- }
- }
- if (!$allowNVIDIA_rpms) {
- $allowNVIDIA_rpms = system("modprobe NVdriver 2>/dev/null") == 0 && []; #- empty list but true.
- }
- $allowNVIDIA_rpms;
-}
-
sub ask_for_X_restart {
my ($in) = @_;