diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-17 13:00:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-17 13:00:30 +0000 |
commit | 775534f625a05db82b3492a50cd6d67d1f30e122 (patch) | |
tree | 48cbf2c7b822bb224c9a44201783d6d97ec17d5a /perl-install/standalone/XFdrake | |
parent | c60b796a26ac6510d4089bdfdc3ae92f206ca382 (diff) | |
download | drakx-775534f625a05db82b3492a50cd6d67d1f30e122.tar drakx-775534f625a05db82b3492a50cd6d67d1f30e122.tar.gz drakx-775534f625a05db82b3492a50cd6d67d1f30e122.tar.bz2 drakx-775534f625a05db82b3492a50cd6d67d1f30e122.tar.xz drakx-775534f625a05db82b3492a50cd6d67d1f30e122.zip |
Big Xconfigurator.pm cleanup/rework
- use $X instead of $o (to avoid name conflict with DrakX's $o)
- {flag}{noclockprobe} unused, dropping it
- rename {memory} into "VideoRam"
- rename {ramdac} into {Ramdac}
- rename {chipset} into {Chipset}
- rename {clockchip} into {Clockchip}
- rename {keyboard}{xkb_model} into {keyboard}{XkbModel}
- rename {keyboard}{xkb_keymap} into {keyboard}{XkbLayout}
- drop {mouse}{chordmiddle} (obsolete)
- drop {mouse}{cleardtrrts} (obsolete, was not written to XF4 config)
- &testConfig is unused, removing it
- as a concequence, {clocklines} is never set, dropping it
- when UNSUPPORTED remove {driver}, instead of setting {flag}{unsupported}
- Cards+ now only provide {Chipset} for cards needing it
=> {flag}{needChipset} not needed anymore
- moved setting needVideoRam in Cards+ (via NEEDVIDEORAM)
(hoping it will work: since the regexp was broken, it was never done.
(it was applied on the module field of pcitable, instead of the description))
- dropped modelines_text_Trident_TG_96xx case (it has never been used)
- rename %xkb_options into %XkbOptions
- rename {DRI_glx} into {DRI_GLX}, the value now comes from Cards+
instead of regexp'ing {identifier}
- rename {Utah_glx} into {UTAH_GLX}, the value now comes from Cards+
instead of regexp'ing {identifier}
- rename {Utah_glx_EXPERIMENTAL} into {UTAH_GLX_EXPERIMENTAL}, the value now comes from Cards+
instead of regexp'ing {identifier}
- very_bad_card and bad_card are now the same, the value now comes from
Cards+ (BAD_FB_RESTORE & BAD_FB_RESTORE_XF3)
- drop unused @accelservers
- remove $modelines_text_apple, use $modelines_text_ext instead
- don't use a <Section "Modes"> together with <UseModes "Mac Modes">, put
directly modelines in Section "Monitor"
(why should ppc behave differently than others!?)
- replace (conflicting) ModeLines "1280x1024 @ 74 Hz" and
"1280x1024 @ 76 Hz" with "1280x1024 @ 75 Hz" (from ddcxinfos)
- drop ModeLine "640x480 @ 72 Hz"
(it conflicts, and anyway, it has no real use nowadays :)
- drop comments about HorizSync, VertRefresh and ModeLine's from
XF86Config
- drop many unneeded stuff from XF86Config:
AutoRepeat, Xqueue, Xleds, NoTrapSignals, XkbTypes, XkbKeycodes,
XkbCompat, XkbRules, LeftAlt/RightAlt/ScrollLock/RightCtl
- drop section comments from XF86Config
- drop XF86_Mono configuration
(it doesn't work anyway, seems like it needs a special ModeLine?)
- drop 320x200 with XF86_SVGA (who can use this!?)
- do not write Screen section "accel" if the server configured is not an
accel one
- drop the "Generic VGA" Device section for XF4
(this device is unused)
- drop {monitor}{vendor}, {monitor}{model}, {card}{vendor}, {card}{model},
{card}{board} (only description strings, not useful for running the server)
- use x_res instead of wres for things like 1024 in 1024x768
Diffstat (limited to 'perl-install/standalone/XFdrake')
-rwxr-xr-x | perl-install/standalone/XFdrake | 63 |
1 files changed, 27 insertions, 36 deletions
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index e432b9681..e5e7b5609 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -60,45 +60,36 @@ Xconfig::getinfo($i); Xconfig::getinfoFromXF86Config($i); #- take default from here at least. my $allowNVIDIA_rpms; -my (%list, %select); -#- local *F; -#- open F, "/var/lib/urpmi/depslist.ordered"; -#- while (<F>) { -#- /(.*NVIDIA.*)-([^-]*)-([^-]*)\s+/ and $list{$1} = 1; -#- } -#- close F; -#- now replaced by the following code using directly urpm library. -eval { - require urpm; - my $urpm = new urpm; - $urpm->read_config(nocheck_access => 1); - foreach (grep { !$_->{ignore} } @{$urpm->{media} || []}) { - $urpm->parse_synthesis($_); - } - foreach (@{$urpm->{params}{depslist} || []}) { - $_->{name} =~ /NVIDIA/ and $list->{$_->{name}} = 1; - } -}; -if ($list{NVIDIA_GLX}) { +{ + my (%list, %select); eval { - my ($version, $release, $ext) = `uname -r` =~ /([^-]*)-([^-]*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; + require urpm; + my $urpm = new urpm; + $urpm->read_config(nocheck_access => 1); + foreach (grep { !$_->{ignore} } @{$urpm->{media} || []}) { + $urpm->parse_synthesis($_); + } + foreach (@{$urpm->{params}{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" ]; } - $allowNVIDIA_rpms = [ keys(%select), "NVIDIA_GLX" ]; } -} -if (!$allowNVIDIA_rpms) { - my ($uname_r) = `uname -r` =~ /(\S+)/; - $allowNVIDIA_rpms = ((-e "/lib/modules/$uname_r/kernel/drivers/char/NVdriver.o.gz" || - -e "/lib/modules/$uname_r/kernel/drivers/char/NVdriver.o") && - -e "/usr/X11R6/lib/modules/drivers/nvidia_drv.o" && - -e "/usr/X11R6/lib/modules/extensions/libglx.so") && []; #- empty list but true. + if (!$allowNVIDIA_rpms) { + $allowNVIDIA_rpms = system("modprobe NVdriver 2>/dev/null") == 0 && []; #- empty list but true. + } } $::isEmbedded and kill USR2, $::CCPID; |