From 929cd08b98be66e7bea4fd3f567ee4893bf32e12 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Mon, 4 Oct 2010 16:57:07 +0400 Subject: [PATCH] Fix nvidia old drivers installation. --- pym/cl_fill_install.py | 6 +++--- pym/cl_install.py | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pym/cl_fill_install.py b/pym/cl_fill_install.py index b5a7be0..7631a2c 100644 --- a/pym/cl_fill_install.py +++ b/pym/cl_fill_install.py @@ -1075,9 +1075,9 @@ class fillVars(object, glob_attr): if not nvidiaeclass: return "" cardsid = map(lambda x:x.groups()[0], - filter(lambda x:x, - map(lambda x:re.search("\d{4}:(\d{4})",x), - nvidiacards))) + filter(lambda x:x, + map(lambda x:re.search("[0-9a-fA-F]{4}:([0-9a-fA-F]{4})",x), + nvidiacards))) if not cardsid: return "" eclassdata = open(nvidiaeclass,'r').read() diff --git a/pym/cl_install.py b/pym/cl_install.py index eb13a44..a1c34e4 100644 --- a/pym/cl_install.py +++ b/pym/cl_install.py @@ -1558,14 +1558,16 @@ class cl_install(color_print): self.clVars.Get('hr_video')) open(nvidiaMaskFile,'w').write(maskNvidia) try: + envDict = {'PKGDIR':binPackages} + envDict.update(os.environ) processEmerge = process('/usr/bin/emerge','-k','nvidia-drivers', - envdict={'PKGDIR':binPackages},stdout=PIPE,stderr=PIPE) + envdict=envDict,stdout=PIPE,stderr=PIPE) res = processEmerge.success() except KeyboardInterrupt: os.unlink(nvidiaMaskFile) return False if not res: - os.unlink(maskFile) + os.unlink(nvidiaMaskFile) return res def configureSystem(self): @@ -1612,12 +1614,12 @@ class cl_install(color_print): pathGlModules = path.join(self.clVars.Get('cl_chroot_path'), 'usr/lib/opengl') - if path.exists(pathGlModules): - self.printMessageForTest(_("Configure OpenGL")) - self.printByResult(self.setupOpenGL()) if self.clVars.Get('os_root_type') != "livecd": self.printMessageForTest(_("Check the video driver")) self.printByResult(self.checkVideoDriver()) + if path.exists(pathGlModules): + self.printMessageForTest(_("Configure OpenGL")) + self.printByResult(self.setupOpenGL()) except (InstallError,DistributiveError),e: error = e