From 213dd7e3231033ad02a7c831df210acec32cf282 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 10 Jan 2021 11:52:46 +0100 Subject: scripts/auto-bootstraps/analyse_result: add links for stage2/3 fails much like emerge -e system, stage 2 and 3 use portage, thus individual buildlogs exist, which are much less in size than the entire stagelogs. Signed-off-by: Fabian Groffen --- scripts/auto-bootstraps/analyse_result.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/scripts/auto-bootstraps/analyse_result.py b/scripts/auto-bootstraps/analyse_result.py index 880fd64343..459341c8c7 100755 --- a/scripts/auto-bootstraps/analyse_result.py +++ b/scripts/auto-bootstraps/analyse_result.py @@ -67,15 +67,27 @@ def get_err_reason(arch, dte, err): with open(stagelog, 'rb') as f: errexp = re.compile(r'^( \* (ERROR:|Fetch failed for)|emerge: there are no) ') for line in f: - res = errexp.match(line.decode('utf-8', 'ignore')) + line = line.decode('utf-8', 'ignore') + res = errexp.match(line) if res: break if not line: return 'stage %d failed' % \ (os.path.join(arch, '%d' % dte), err, err) - return 'stage %d failed
%s' % \ - (os.path.join(arch, '%d' % dte), err, err, \ - html.escape(line.decode('utf-8', 'ignore'))) + m = re.fullmatch( + r'(\* ERROR: )([a-z-]+/[a-zA-Z0-9._-]+)(::gentoo.* failed.*)', + line.strip()) + if m: + return 'stage %d failed
' % \ + (os.path.join(arch, '%d' % dte), err, err) + \ + '%s%s%s' % \ + (html.escape(m.group(1)), \ + os.path.join(arch, '%d' % dte, "portage", m.group(2)), \ + html.escape(m.group(2)), html.escape(m.group(3))) + else: + return 'stage %d failed
%s' % \ + (os.path.join(arch, '%d' % dte), err, err, \ + html.escape(line)) else: return 'stage %d did not start' % err if err == 4: -- cgit v1.2.3-65-gdbad