|
|
|
@ -328,7 +328,7 @@ class cl_builder(color_print):
|
|
|
|
|
res = filter(lambda x:optCheck in x,
|
|
|
|
|
open(configPath,'r'))
|
|
|
|
|
if not res:
|
|
|
|
|
self.printWARNING(_("WARNING") +": " +
|
|
|
|
|
self.printERROR(_("ERROR") +": " +
|
|
|
|
|
_("kernel not support '%s' compression format for squashfs")%
|
|
|
|
|
self.compression)
|
|
|
|
|
return False
|
|
|
|
@ -356,7 +356,8 @@ class cl_builder(color_print):
|
|
|
|
|
imagefile = self.clVars.Get('cl_builder_image')
|
|
|
|
|
if imagefile:
|
|
|
|
|
self.printSUCCESS(_("Image will be created at: %s")% imagefile)
|
|
|
|
|
self.checkSquashCompress()
|
|
|
|
|
if not self.checkSquashCompress():
|
|
|
|
|
return False
|
|
|
|
|
if path.exists(imagefile):
|
|
|
|
|
self.printWARNING(_("WARNING") +": " +
|
|
|
|
|
_("image already exists") + ", "+
|
|
|
|
@ -383,6 +384,7 @@ class cl_builder(color_print):
|
|
|
|
|
self.defaultPrint("\n")
|
|
|
|
|
else:
|
|
|
|
|
self.printWARNING("No path for image creating.")
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def printRescratchInfo(self):
|
|
|
|
|
self.printSUCCESS(_("Rebuilding live image of") + " Calculate Linux")
|
|
|
|
@ -402,13 +404,15 @@ class cl_builder(color_print):
|
|
|
|
|
|
|
|
|
|
self.printSUCCESS(_("Image will be created in: %s")%
|
|
|
|
|
self.clVars.Get('cl_builder_iso_path'))
|
|
|
|
|
self.checkSquashCompress()
|
|
|
|
|
if not self.checkSquashCompress():
|
|
|
|
|
return False
|
|
|
|
|
if self.clVars.Get('cl_builder_remove_squash'):
|
|
|
|
|
self.printSUCCESS(
|
|
|
|
|
_("Follow squash images will be removed: %s\n")%
|
|
|
|
|
", ".join(self.clVars.Get('cl_builder_remove_squash')))
|
|
|
|
|
else:
|
|
|
|
|
self.defaultPrint("\n")
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def checkVariables(self,rescratch=False):
|
|
|
|
|
"""Check values of variables"""
|
|
|
|
@ -459,7 +463,8 @@ class cl_builder(color_print):
|
|
|
|
|
sourceDirectory = self.clVars.Get('cl_builder_path')
|
|
|
|
|
bindDirectory = pathJoin(buildDirectory,
|
|
|
|
|
self.clVars.Get('cl_builder_squash_path'))
|
|
|
|
|
self.printInfo()
|
|
|
|
|
if not self.printInfo():
|
|
|
|
|
return False
|
|
|
|
|
if not self.checkVariables():
|
|
|
|
|
return False
|
|
|
|
|
excludeList = self._excludeList(sourceDirectory)
|
|
|
|
@ -540,7 +545,8 @@ class cl_builder(color_print):
|
|
|
|
|
self.printERROR(
|
|
|
|
|
_("The computer must be load from the flash in Builder mode"))
|
|
|
|
|
return False
|
|
|
|
|
self.printRescratchInfo()
|
|
|
|
|
if not self.printRescratchInfo():
|
|
|
|
|
return False
|
|
|
|
|
if not self.checkVariables(rescratch=True):
|
|
|
|
|
return False
|
|
|
|
|
excludeList = self._excludeList(sourceDirectory)
|
|
|
|
|