From 7b67095ec6163bb438ce046d54fae0f04d3508eb Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Sat, 27 Nov 2010 13:52:02 +0300 Subject: [PATCH] Fix kernel cleaning. --- pym/cl_builder.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pym/cl_builder.py b/pym/cl_builder.py index 0e5051d..2d7ed17 100644 --- a/pym/cl_builder.py +++ b/pym/cl_builder.py @@ -24,7 +24,7 @@ import traceback from os import path from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,\ childMounts,_toUNICODE,isMount,typeFile, \ - removeDir + removeDir, pathJoin from subprocess import STDOUT,PIPE from cl_print import color_print from cl_datavars import DataVars @@ -193,23 +193,23 @@ class cl_builder(color_print): delFiles = filter(lambda x: not x in rightKernelFiles, filter(reTrash.search, os.listdir(bootDir))) - map(lambda x:os.unlink(path.join(bootDir,x)),delFiles) + map(lambda x:os.unlink(pathJoin(bootDir,x)),delFiles) self.printByResult(True) self.printMessageForTest(_("Cleaning %s directory") % "/lib/modules") reKernelVer = re.compile(" version (\S+)\s",re.S) ftype = typeFile(magic=0x4).getMType - resReg = reKernelVer.search(ftype(path.join(bootDir, + resReg = reKernelVer.search(ftype(pathJoin(bootDir, self.clVars.Get('cl_builder_kernel')))) if resReg: kernelVersion = resReg.groups()[0] - map(lambda x:removeDir(path.join(modulesDir,x)), + map(lambda x:removeDir(pathJoin(modulesDir,x)), filter(lambda x:x != kernelVersion, os.listdir(modulesDir))) self.printByResult(True) self.printMessageForTest(_("Cleaning %s directory")% "/usr/src") removeKernelSources = filter(lambda x:x and x != "/usr/src/linux", self.runChroot(distrPath,"qfile -o /usr/src/*")) - map(lambda x:removeDir(path.join(distrPath,x)), + map(lambda x:removeDir(pathJoin(distrPath,x)), removeKernelSources) self.printByResult(True)