|
|
|
@ -97,6 +97,7 @@ class cl_assemble(color_print):
|
|
|
|
|
# progname - check by 'which' existing this program
|
|
|
|
|
# hideout - hide stdout
|
|
|
|
|
# foraction - perform only for cl_action == value
|
|
|
|
|
DEFAULT_FORACTION = ('make','syncupdate','update')
|
|
|
|
|
ACTION_LIST = \
|
|
|
|
|
[
|
|
|
|
|
# emerge -e system first
|
|
|
|
@ -117,7 +118,7 @@ class cl_assemble(color_print):
|
|
|
|
|
'foraction':('make',)},
|
|
|
|
|
# update prepareTemplates
|
|
|
|
|
{'command':"prepareTemplates()",
|
|
|
|
|
'foraction':('syncupdate','update'),
|
|
|
|
|
'foraction':('syncupdate','update','applytemplates'),
|
|
|
|
|
'hideout':True,
|
|
|
|
|
'message':_("Configurate by %s templates")% "assemble"
|
|
|
|
|
},
|
|
|
|
@ -296,6 +297,8 @@ class cl_assemble(color_print):
|
|
|
|
|
self.clVars.Set("cl_action","syncupdate",True)
|
|
|
|
|
elif action == "dependence":
|
|
|
|
|
self.clVars.Set("cl_action","dependence",True)
|
|
|
|
|
elif action == "applytemplates":
|
|
|
|
|
self.clVars.Set("cl_action","applytemplates",True)
|
|
|
|
|
else:
|
|
|
|
|
self.clVars.Set("cl_action","configure",True)
|
|
|
|
|
|
|
|
|
@ -876,10 +879,16 @@ class cl_assemble(color_print):
|
|
|
|
|
return self.make(self.makeFunc,force,True,False)
|
|
|
|
|
|
|
|
|
|
def updateSystem(self,force,withsync=True):
|
|
|
|
|
self.msgOperationComplete = \
|
|
|
|
|
_("System assembled is successfully")+"!"
|
|
|
|
|
self.msgOperationFailed = \
|
|
|
|
|
_("System compiling failed")
|
|
|
|
|
if self.clVars.Get('cl_action') == "applytemplates":
|
|
|
|
|
self.msgOperationComplete = \
|
|
|
|
|
_("Templates appling is successfully")+"!"
|
|
|
|
|
self.msgOperationFailed = \
|
|
|
|
|
_("Templates appling failed")
|
|
|
|
|
else:
|
|
|
|
|
self.msgOperationComplete = \
|
|
|
|
|
_("System assembled is successfully")+"!"
|
|
|
|
|
self.msgOperationFailed = \
|
|
|
|
|
_("System compiling failed")
|
|
|
|
|
if not self._pidCheck():
|
|
|
|
|
return False
|
|
|
|
|
stepWorld = filter(lambda x:x,
|
|
|
|
@ -926,7 +935,7 @@ class cl_assemble(color_print):
|
|
|
|
|
# cancel if action make
|
|
|
|
|
if forcesystem:
|
|
|
|
|
return True
|
|
|
|
|
else:
|
|
|
|
|
elif self.clVars.Get('cl_action') != "applytemplates":
|
|
|
|
|
# print warning and drop force option
|
|
|
|
|
self.printWARNING(_("WARNING") +": " +
|
|
|
|
|
_("assemble already finished"))
|
|
|
|
@ -1039,7 +1048,8 @@ class cl_assemble(color_print):
|
|
|
|
|
if "progname" in action:
|
|
|
|
|
if not self._checkChrootProgram(action["progname"]):
|
|
|
|
|
continue
|
|
|
|
|
if "foraction" in action and not actionName in action["foraction"]:
|
|
|
|
|
|
|
|
|
|
if not actionName in action.get('foraction',self.DEFAULT_FORACTION):
|
|
|
|
|
continue
|
|
|
|
|
if "command" in action:
|
|
|
|
|
command = action["command"]
|
|
|
|
@ -1072,7 +1082,7 @@ class cl_assemble(color_print):
|
|
|
|
|
if not "command" in action:
|
|
|
|
|
continue
|
|
|
|
|
# if specified "progname" check by which in chroot this prog
|
|
|
|
|
if "foraction" in action and not actionName in action["foraction"]:
|
|
|
|
|
if not actionName in action.get('foraction',self.DEFAULT_FORACTION):
|
|
|
|
|
continue
|
|
|
|
|
command = action["command"]
|
|
|
|
|
if "args" in action:
|
|
|
|
|