|
|
|
@ -202,8 +202,7 @@ class cl_assemble(color_print):
|
|
|
|
|
self.defaultPrint("\n")
|
|
|
|
|
|
|
|
|
|
def _checkAlreadyAssembling(self):
|
|
|
|
|
section = "%s-%s"%(self.clVars.Get('os_assemble_linux_shortname'),
|
|
|
|
|
self.clVars.Get('os_assemble_arch_machine'))
|
|
|
|
|
section = ",".join(self.__sectionName())
|
|
|
|
|
if section in self.clVars.Get('cl_assemble_distro'):
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
@ -219,7 +218,7 @@ class cl_assemble(color_print):
|
|
|
|
|
if not self._checkAlreadyAssembling():
|
|
|
|
|
dev = self.readEnv('os_assemble_root_dev') or dev
|
|
|
|
|
mp = isMount(dev)
|
|
|
|
|
self.printERROR(_("%(system)s(%(arch)s) is assembling in"
|
|
|
|
|
self.printERROR(_("%(system)s %(arch)s is assembling in"
|
|
|
|
|
" '%(dir)s' now")%
|
|
|
|
|
{'system':self.clVars.Get('os_assemble_linux_shortname'),
|
|
|
|
|
'arch':self.clVars.Get('os_assemble_arch_machine'),
|
|
|
|
@ -540,6 +539,7 @@ class cl_assemble(color_print):
|
|
|
|
|
self.printERROR(_("For performance of operation it is "
|
|
|
|
|
"necessary to configure system")+".")
|
|
|
|
|
self.printERROR(_('Execute with parameter')+' "--configure".')
|
|
|
|
|
self.removeDistroInfo()
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
self.printConfInfo()
|
|
|
|
@ -572,12 +572,12 @@ class cl_assemble(color_print):
|
|
|
|
|
self.printSUCCESS(_("Executing '%s'")% command + " ...")
|
|
|
|
|
if self.runChroot(command, showProcess=True,
|
|
|
|
|
raiseError=False).success():
|
|
|
|
|
self.printSUCCESS(_("%(system)s(%(arch)s) ready for compile")%
|
|
|
|
|
self.printSUCCESS(_("%(system)s %(arch)s ready for compile")%
|
|
|
|
|
{'system':self.clVars.Get('os_assemble_linux_shortname'),
|
|
|
|
|
'arch':self.clVars.Get('os_assemble_arch_machine')})
|
|
|
|
|
return True
|
|
|
|
|
else:
|
|
|
|
|
self.printSUCCESS(_("%(system)s(%(arch)s) have wrong dependence")%
|
|
|
|
|
self.printSUCCESS(_("%(system)s %(arch)s have wrong dependence")%
|
|
|
|
|
{'system':self.clVars.Get('os_assemble_linux_shortname'),
|
|
|
|
|
'arch':self.clVars.Get('os_assemble_arch_machine')})
|
|
|
|
|
return False
|
|
|
|
@ -596,7 +596,7 @@ class cl_assemble(color_print):
|
|
|
|
|
if str(os.getpid()) != self.clVars.Get('cl_assemble_pid'):
|
|
|
|
|
self.printERROR(_("cl-assemble already run")+" "+
|
|
|
|
|
self._getNameByAction() +
|
|
|
|
|
_(" of distributive %(system)s(%(arch)s)")%
|
|
|
|
|
_(" of distributive %(system)s %(arch)s")%
|
|
|
|
|
{'system':self.clVars.Get('os_assemble_linux_shortname'),
|
|
|
|
|
'arch':self.clVars.Get('os_assemble_arch_machine')})
|
|
|
|
|
return False
|
|
|
|
@ -749,8 +749,8 @@ class cl_assemble(color_print):
|
|
|
|
|
|
|
|
|
|
def __sectionName(self):
|
|
|
|
|
"""Get section name of assemble.env by shortname and arch"""
|
|
|
|
|
return "%s-%s"%(self.clVars.Get('os_assemble_linux_shortname'),
|
|
|
|
|
self.clVars.Get('os_assemble_arch_machine'))
|
|
|
|
|
return (self.clVars.Get('os_assemble_linux_shortname'),
|
|
|
|
|
self.clVars.Get('os_assemble_arch_machine'))
|
|
|
|
|
|
|
|
|
|
def writeVar(self,varname,varvalue,setvar=True):
|
|
|
|
|
"""Write variable to assemble env file"""
|
|
|
|
|