|
|
@ -33,24 +33,14 @@ lang().setLanguage(sys.modules[__name__])
|
|
|
|
OSSYSTEM_LIST=sorted(varsShare.dictNameSystem.keys())
|
|
|
|
OSSYSTEM_LIST=sorted(varsShare.dictNameSystem.keys())
|
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION = _("The Calculate Linux image builder")
|
|
|
|
DESCRIPTION = _("The Calculate Linux image builder")
|
|
|
|
CMD_OPTIONS = [{'shortOption':"f",
|
|
|
|
CMD_OPTIONS = [{'shortOption':"p",
|
|
|
|
|
|
|
|
'longOption':"profile",
|
|
|
|
|
|
|
|
'optVal':"PROFILE",
|
|
|
|
|
|
|
|
'help':_("system profile")
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{'shortOption':"f",
|
|
|
|
'longOption':"force",
|
|
|
|
'longOption':"force",
|
|
|
|
'help':_("no questions during the creating process")
|
|
|
|
'help':_("no questions during the creating process")
|
|
|
|
},
|
|
|
|
|
|
|
|
{'shortOption':"s",
|
|
|
|
|
|
|
|
'longOption':"os",
|
|
|
|
|
|
|
|
'optVal':"SYSTEM",
|
|
|
|
|
|
|
|
'type':'choice',
|
|
|
|
|
|
|
|
'choices_regignore':OSSYSTEM_LIST,
|
|
|
|
|
|
|
|
'help':_("select operation system")+
|
|
|
|
|
|
|
|
" (%s)"%",".join(OSSYSTEM_LIST)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{'longOption':"march",
|
|
|
|
|
|
|
|
'optVal':"ARCH",
|
|
|
|
|
|
|
|
'type':'choice',
|
|
|
|
|
|
|
|
'choices':['x86_64','i686'],
|
|
|
|
|
|
|
|
'help':_("select arch for operation system") +
|
|
|
|
|
|
|
|
" (%s)"%_("i686 or x86_64")
|
|
|
|
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
USAGE = _("%prog [options] iso|squash")
|
|
|
|
USAGE = _("%prog [options] iso|squash")
|
|
|
|
|
|
|
|
|
|
|
@ -91,7 +81,7 @@ class image_cmd(share_cmd):
|
|
|
|
|
|
|
|
|
|
|
|
def isAssemble(self,showError=True):
|
|
|
|
def isAssemble(self,showError=True):
|
|
|
|
"""Detect system assembling"""
|
|
|
|
"""Detect system assembling"""
|
|
|
|
if path.exists(self.envFile) \
|
|
|
|
if self.logicObj.clVars.Get('cl_builder_distro') \
|
|
|
|
and self.logicObj.clVars.Get('cl_builder_path'):
|
|
|
|
and self.logicObj.clVars.Get('cl_builder_path'):
|
|
|
|
inidata = iniParser(self.envFile)
|
|
|
|
inidata = iniParser(self.envFile)
|
|
|
|
res = inidata.getVar(self.__sectionName(),"cl_assemble_step_world",
|
|
|
|
res = inidata.getVar(self.__sectionName(),"cl_assemble_step_world",
|
|
|
@ -119,16 +109,14 @@ class image_cmd(share_cmd):
|
|
|
|
if args:
|
|
|
|
if args:
|
|
|
|
self.logicObj.clVars.Set('cl_action',args[0],True)
|
|
|
|
self.logicObj.clVars.Set('cl_action',args[0],True)
|
|
|
|
|
|
|
|
|
|
|
|
if values.s:
|
|
|
|
if values.p:
|
|
|
|
if self.isScratch(False):
|
|
|
|
|
|
|
|
self.optobj.error(_("'-s' not used in scratch mode"))
|
|
|
|
|
|
|
|
if values.march:
|
|
|
|
|
|
|
|
if self.isScratch(False):
|
|
|
|
if self.isScratch(False):
|
|
|
|
self.optobj.error(_("'--march' not used in scratch mode"))
|
|
|
|
self.optobj.error(_("'--profile' not used in scratch mode"))
|
|
|
|
|
|
|
|
|
|
|
|
if not self.isScratch(False) \
|
|
|
|
if not self.isScratch(False) \
|
|
|
|
and self.logicObj.clVars.Get('cl_builder_distro'):
|
|
|
|
and self.logicObj.clVars.Get('cl_builder_distro'):
|
|
|
|
self.logicObj.setAssembleData(values.s,values.march)
|
|
|
|
if not self.logicObj.setAssembleData(values.p):
|
|
|
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
|
|
if args and args[0] == "squash":
|
|
|
|
if args and args[0] == "squash":
|
|
|
|
self.logicObj.clVars.Set('cl_builder_iso_path','/mnt/flash',True)
|
|
|
|
self.logicObj.clVars.Set('cl_builder_iso_path','/mnt/flash',True)
|
|
|
|