Commits

Anonymous committed 24b26db

contl10n01: some cleanup, disabled error search

  • Participants
  • Parent commits 97d86ab

Comments (0)

Files changed (1)

File l10ntools/scripts/tool/commands.py

             for dir in b_stats.bad_dirs:         
                 self._log.error("Building directory " + dir + " failed!")
             b_stats.log_build_duration(start_time, end_time)
-            self._log.warning("Searching for bad languages")
-            bad_langs = self.search_error(env, b_stats.bad_dirs)
-            self._log.warning("*************************************")
-            self._log.warning("Found " + " ".join(bad_langs))
-            self._log.warning("*************************************")
-            utils.Util.send_mail("Found " + " ".join(bad_langs),"Contl10n "+utils.Util.get_platfrom()+" found bad languages",self._log)
+            self._log.die("Build failed in COMPILE")
+            
+            #self._log.warning("Searching for bad languages")
+            #bad_langs = self.search_error(env, b_stats.bad_dirs)
+            #self._log.warning("*************************************")
+            #self._log.warning("Found " + " ".join(bad_langs))
+            #self._log.warning("*************************************")
+            #utils.Util.send_mail("Found " + " ".join(bad_langs),"Contl10n "+utils.Util.get_platfrom()+" found bad languages",self._log)
             # Announce bad languages to other clients!
-            out_lang = self._model.contl10n_status.get_bad_langs_out()
-            out_lang.append(bad_langs)
-            self._model.contl10n_status.set_bad_langs_out(bad_langs)
-            self._model.contl10n_status.set_state(self._model.contl10n_status.FOUND_BAD_LANGUAGES)
+            #out_lang = self._model.contl10n_status.get_bad_langs_out()
+            #out_lang.append(bad_langs)
+            #self._model.contl10n_status.set_bad_langs_out(bad_langs)
+            #self._model.contl10n_status.set_state(self._model.contl10n_status.FOUND_BAD_LANGUAGES)
 
-            if self._state_cfg.has_option("MERGE","bad_langs"):
-                prev = self.unpack_list(self._state_cfg.get("MERGE","bad_langs"))
-                prev.append(bad_langs)
-                self._state_cfg.set("MERGE","bad_langs",prev)
-            else:
-                self._state_cfg.set("MERGE","bad_langs",bad_langs)
+            #if self._state_cfg.has_option("MERGE","bad_langs"):
+            #    prev = self.unpack_list(self._state_cfg.get("MERGE","bad_langs"))
+            #    prev.append(bad_langs)
+            #    self._state_cfg.set("MERGE","bad_langs",prev)
+            #else:
+            #    self._state_cfg.set("MERGE","bad_langs",bad_langs)
 
-            lang_list = set(env["WITH_LANG"].split()) - set(bad_langs)
-            env["WITH_LANG"] = " ".join(lang_list)
-            self.revert_langs(bad_langs, env)
-            b_stats.bad_dirs = []
-            self.do(env) 
+            #lang_list = set(env["WITH_LANG"].split()) - set(bad_langs)
+            #env["WITH_LANG"] = " ".join(lang_list)
+            #self.revert_langs(bad_langs, env)
+            #b_stats.bad_dirs = []
+            #self.do(env) 
         
         self._log.info("Make keyid archive set")
         old_path = os.getcwd()
             self._log.info("Uploading " + str(len(self._sdf_error_files)) + " sdf error files to "+self._server_url+":"+self._server_path)
             upload_cmd = "scp -i %s %s %s@%s " % (self._server_keyfile, " ".join(self._sdf_error_files), self._server_user, self._server_url+":"+self._server_path)
             self._log.info(upload_cmd)
-            scp_rc, stdout_v, stderr_v = utils.Util.exe(upload_cmd, self._log)
+            if " ".join(self._sdf_error_files) != "":
+                scp_rc, stdout_v, stderr_v = utils.Util.exe(upload_cmd, self._log)
  
         # key id sdf file
-        if len(self._sdf_error_files) > 0:
-            self._log.info("Uploading key id sdf file to "+self._server_url+":"+self._server_path)
-            upload_cmd_kid_sdf = "scp -i %s %s %s@%s " % (self._server_keyfile, self._cws_root_dir + "/l10n/" + self._kid_sdf , self._server_user, self._server_url+":"+self._server_path+"/kid.sdf")
-            self._log.info(upload_cmd_kid_sdf)
-            scp_rc, stdout_v, stderr_v = utils.Util.exe(upload_cmd_kid_sdf, self._log)
+        self._log.info("Uploading key id sdf file to "+self._server_url+":"+self._server_path)
+        upload_cmd_kid_sdf = "scp -i %s %s %s@%s " % (self._server_keyfile, self._cws_root_dir + "/l10n/" + self._kid_sdf , self._server_user, self._server_url+":"+self._server_path+"/kid.sdf")
+        self._log.info(upload_cmd_kid_sdf)
+        scp_rc, stdout_v, stderr_v = utils.Util.exe(upload_cmd_kid_sdf, self._log)
         
         
         # Log file
         self._cws_name    = utils.Util.replace_variables(tool_cfg.get("CWS","cws_name"), env, tool_cfg, log)
 
     def do(self, env):
-        
         eis_con = eis.Eis.get_eis(eiswrapper.EisWrapper.url,eiswrapper.EisWrapper.namespace,"","")
         eisc = eiswrapper.EisWrapper(eis_con,self._cws_name)
         self._log.info("CWS "+self._cws_name+":")
             for dir in b_stats.bad_dirs:         
                 self._log.error("Building directory " + dir + " failed!")
             b_stats.log_build_duration(start_time, end_time)
-            self._log.die("Good bye cruel world")
+            self._log.die("Build failed in PREBUILD")
 
         # No!
         b_stats.log_build_duration(start_time, end_time)