diff options
author | Fabian Groffen <grobian@gentoo.org> | 2021-01-10 11:52:46 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2021-01-10 11:53:53 +0100 |
commit | 213dd7e3231033ad02a7c831df210acec32cf282 (patch) | |
tree | 071ee55723df015f08403ce321fc0568a8e5b69d | |
parent | scripts/bootstrap-prefix: bump tree for pkgconf fix (diff) | |
download | prefix-213dd7e3231033ad02a7c831df210acec32cf282.tar.gz prefix-213dd7e3231033ad02a7c831df210acec32cf282.tar.bz2 prefix-213dd7e3231033ad02a7c831df210acec32cf282.zip |
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 <grobian@gentoo.org>
-rwxr-xr-x | scripts/auto-bootstraps/analyse_result.py | 20 |
1 files 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 '<a href="%s/stage%d.log">stage %d</a> failed' % \ (os.path.join(arch, '%d' % dte), err, err) - return '<a href="%s/stage%d.log">stage %d</a> failed<br />%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 '<a href="%s/stage%d.log">stage %d</a> failed<br />' % \ + (os.path.join(arch, '%d' % dte), err, err) + \ + '%s<a href="%s/temp/build.log">%s</a>%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 '<a href="%s/stage%d.log">stage %d</a> failed<br />%s' % \ + (os.path.join(arch, '%d' % dte), err, err, \ + html.escape(line)) else: return 'stage %d did not start' % err if err == 4: |