commit:     99dcb588c27184023d01ae6a55308e999ce25c20
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 30 09:16:33 2024 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Sat Mar 30 09:16:33 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=99dcb588

Add build dep irc report

Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>

 buildbot_gentoo_ci/config/reporters.py | 3 ++-
 buildbot_gentoo_ci/steps/builders.py   | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/buildbot_gentoo_ci/config/reporters.py 
b/buildbot_gentoo_ci/config/reporters.py
index ede9178..c1f0aef 100644
--- a/buildbot_gentoo_ci/config/reporters.py
+++ b/buildbot_gentoo_ci/config/reporters.py
@@ -13,7 +13,8 @@ irc_template = '''{% set resultsList = ["\x0303SUCCESS", 
"\x0308WARNINGS", "\x03
 {{ "\x02" }}{{ build['properties']['cpv'][0] }}{{ "\x02" }} {{ "\x0303" 
}}Repo:{{ projects }}:{{ build['properties']['branch'][0] }}{{ "\x03" }} \
 {{ build['properties']['revision'][0]|truncate(10, True) }} {{ "\x0302" }}{{ 
build['properties']['owners'][0][0] }}{{ "\x03" }} \
 {{ "\x0306" }}{{ build['properties']['event'][0] }}{{ "\x03" }} {{ projects 
}}:{{ build['properties']['project_data'][0]['name'] }} \
-{{ "\x02" }}{{ "Build: "}}{{ resultsList[build['results']] }}{{ "\x03" }}{{ 
"\x02" }} {{ "\x0312" }}{{ build_url }}{{ "\x03" }} \
+{{ "\x02" }}{{ "Build: "}}{{ resultsList[build['results']] }}{{ "\x03" }}{{ 
"\x02" }} Dep: {{ resultsList[build['properties']['faild_dep'][0]] }} \
+{{ "\x0312" }}{{ build_url }}{{ "\x03" }} \
 {% if build['properties']['bgo'][0]['match'] is true %}{{ "\x0311" }}Bug: {{ 
"\x03" }}https://bugs.gentoo.org/{{build['properties']['bgo'][0]['id']}}{% 
endif %}\
 '''
 

diff --git a/buildbot_gentoo_ci/steps/builders.py 
b/buildbot_gentoo_ci/steps/builders.py
index 73e82f5..53f79ab 100644
--- a/buildbot_gentoo_ci/steps/builders.py
+++ b/buildbot_gentoo_ci/steps/builders.py
@@ -899,6 +899,7 @@ class CheckEmergeLogs(BuildStep):
         self.setProperty('faild_cpv', emerge_output['failed'], 'faild_cpv')
         self.faild_version_data = False
         self.log_data = {}
+        self.faild_dep = 0
         package_dict = emerge_output['packages']
 
         #FIXME: Prosees the logs and do stuff
@@ -1060,6 +1061,7 @@ class CheckEmergeLogs(BuildStep):
                             self.faild_version_data = 
self.getProperty("version_data")
                         else:
                             repository = False
+                            self.faild_dep = 2
                             for cpv, v in package_dict.items():
                                 if cpv == emerge_output['failed']:
                                     repository = v['repository']
@@ -1082,10 +1084,11 @@ class CheckEmergeLogs(BuildStep):
                         'pkg_check_log_data' : 
self.getProperty("pkg_check_log_data"),
                         'repository_data' : 
self.getProperty('repository_data'),
                         'faild_cpv' : emerge_output['failed'],
+                        'faild_dep' : self.faild_dep
                         'build_workername' : self.getProperty('workername')
                     }
                 ))
-            if rebuild:
+            if isinstance(rebuild, str):
                 #FIXME: Set build timeout in config
                 build_timeout = 6600
                 shell_commad_list = []

Reply via email to