|
|
|
@ -496,40 +496,6 @@ class Install(MethodsInterface):
|
|
|
|
|
if grub_process.failed():
|
|
|
|
|
raise DistributiveError(_("Failed to install the bootloader"))
|
|
|
|
|
|
|
|
|
|
def setupOpenGL(self):
|
|
|
|
|
"""
|
|
|
|
|
Выполнить выбор opengl для текущего видеодрайвера
|
|
|
|
|
"""
|
|
|
|
|
default_gl = "xorg-x11"
|
|
|
|
|
path_gl_modules = SystemPath(
|
|
|
|
|
self.clVars.Get('cl_chroot_path')).libopengl
|
|
|
|
|
open_gl_env = path.join(self.clVars.Get('cl_chroot_path'),
|
|
|
|
|
'etc/env.d/000opengl')
|
|
|
|
|
|
|
|
|
|
open_gl_mods = filter(lambda x: x != "global",
|
|
|
|
|
listDirectory(path_gl_modules))
|
|
|
|
|
map_gl_drivers = {'fglrx': ("ati" if "ati" in open_gl_mods
|
|
|
|
|
else default_gl),
|
|
|
|
|
'nvidia': "nvidia" if "nvidia" in open_gl_mods
|
|
|
|
|
else default_gl}
|
|
|
|
|
x11_driver = self.clVars.Get('os_install_x11_video_drv')
|
|
|
|
|
if x11_driver in map_gl_drivers:
|
|
|
|
|
new_module_name = map_gl_drivers[x11_driver]
|
|
|
|
|
else:
|
|
|
|
|
new_module_name = default_gl
|
|
|
|
|
current_module_name = map(
|
|
|
|
|
lambda x: x.strip().rpartition('=')[-1].strip('"\''),
|
|
|
|
|
filter(lambda x: x.startswith("OPENGL_PROFILE="),
|
|
|
|
|
readLinesFile(open_gl_env)))
|
|
|
|
|
if current_module_name:
|
|
|
|
|
current_module_name = current_module_name[-1]
|
|
|
|
|
else:
|
|
|
|
|
current_module_name = ""
|
|
|
|
|
if current_module_name == new_module_name:
|
|
|
|
|
return True
|
|
|
|
|
return process('/usr/bin/eselect', 'opengl', 'set',
|
|
|
|
|
new_module_name).success()
|
|
|
|
|
|
|
|
|
|
def checkVideoDriver(self):
|
|
|
|
|
"""
|
|
|
|
|
Проверить видео драйвер, и если это nvidia, то
|
|
|
|
|