From f4b9fb94bf279795f5344d2dd6dd6700b53ca711 Mon Sep 17 00:00:00 2001 From: Mike khiretskiy Date: Fri, 11 Oct 2013 09:50:29 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D0=BA=D0=B0=20opengl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/install.py | 2 +- install/utils/cl_setup.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index 3ae3eb9..982a80d 100644 --- a/install/install.py +++ b/install/install.py @@ -350,7 +350,7 @@ class Install: newModuleName = defaultGL curModuleName = map(lambda x:x.strip().rpartition('=')[-1].strip('"\''), filter(lambda x: x.startswith("OPENGL_PROFILE="), - open(openGLenv,'r'))) + readFile(openGLenv))) curModuleName = curModuleName[-1] if curModuleName else "" if curModuleName == newModuleName: return True diff --git a/install/utils/cl_setup.py b/install/utils/cl_setup.py index fab08b9..968680d 100644 --- a/install/utils/cl_setup.py +++ b/install/utils/cl_setup.py @@ -18,6 +18,7 @@ import sys from calculate.core.server.func import Action,Tasks from calculate.lib.cl_lang import setLocalTranslate,getLazyLocalTranslate from calculate.lib.utils.files import FilesError +from calculate.lib.utils.portage import isPkgInstalled from calculate.install.install import (MigrationError, TemplatesError, InstallError, AutopartitionError, DistributiveError) @@ -43,10 +44,12 @@ class ClSetupVideoAction(Action): {'name':'check_video', 'message':__("Checking the video driver"), 'method':'Install.checkVideoDriver()', + 'condition': lambda:isPkgInstalled('xorg-server') }, {'name':'setup_opengl', 'message':__("Configuring OpenGL"), 'method':'Install.setupOpenGL()', + 'condition': lambda:isPkgInstalled('xorg-server') }, {'name':'reboot', 'warning':__("To apply the changes, reboot the system"),