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"),