|
|
@ -78,14 +78,15 @@ class image_cmd(share_cmd):
|
|
|
|
|
|
|
|
|
|
|
|
def isScratch(self,showError=True):
|
|
|
|
def isScratch(self,showError=True):
|
|
|
|
"""Detect scartch system"""
|
|
|
|
"""Detect scartch system"""
|
|
|
|
if not path.exists(self.envFile) \
|
|
|
|
if not os.access(self.envFile,os.R_OK) \
|
|
|
|
or not self.logicObj.clVars.Get('cl_builder_path'):
|
|
|
|
or not self.logicObj.clVars.Get('cl_builder_path'):
|
|
|
|
if self.logicObj.clVars.Get('os_scratch') == 'on':
|
|
|
|
if self.logicObj.clVars.Get('os_scratch') == 'on':
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if showError:
|
|
|
|
if showError:
|
|
|
|
self.printERROR(
|
|
|
|
self.printERROR(
|
|
|
|
_("You should load system in the builder mode"))
|
|
|
|
_("You should load system in the builder mode") + " "
|
|
|
|
|
|
|
|
+ _("or have to assemble system"))
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
@ -128,6 +129,10 @@ class image_cmd(share_cmd):
|
|
|
|
if not self.logicObj.setAssembleData(values.p,values.v):
|
|
|
|
if not self.logicObj.setAssembleData(values.p,values.v):
|
|
|
|
sys.exit(1)
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not self.logicObj.clVars.Get('cl_builder_distro'):
|
|
|
|
|
|
|
|
if not self.isRoot() or not self.isScratch(True):
|
|
|
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
|
|
if values.notree:
|
|
|
|
if values.notree:
|
|
|
|
self.logicObj.clVars.Set('cl_builder_tree','off',True)
|
|
|
|
self.logicObj.clVars.Set('cl_builder_tree','off',True)
|
|
|
|
|
|
|
|
|
|
|
|