コード例 #1
0
 def installProg(self):
     '''Install this program'''
     apiDict = self.clVars.Get("cl_api")
     apiDict.update({__app__:self.apiFile})
     self.clVars.Write("cl_api", force=True)
     if not appendProgramToEnvFile(__app__, self.clVars):
         self.printERROR(_("Can not save '%s'") %__app__ + " " +\
                         _("to %s") %self.clVars.Get("cl_env_path")[0])
         return False
     self.printOK(_("Save install variables"))
     return True
コード例 #2
0
 def installProg(self):
     """Наложение шаблонов на систему при инсталяции"""
     # Проверяем на root
     if not self.isRoot():
         return False
     self.clVars.AppendToList("cl_merges", __app__, force=True)
     # Действие инсталяция
     self.clVars.Set("cl_action", "install", True)
     if not self.applyTemplatesFromSystem():
         self.printERROR(_("Failed to apply install templates"))
         return False
     # Добавление программы в инсталяционную переменную
     if not appendProgramToEnvFile(__app__, self.clVars):
         self.printERROR(_("Failed to save '%s'") % __app__ + " " + _("to %s") % self.clVars.Get("cl_env_path")[0])
         return False
     self.printOK(_("Install templates applied"))
     return True