summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2021-01-10 11:52:46 +0100
committerFabian Groffen <grobian@gentoo.org>2021-01-10 11:53:53 +0100
commit213dd7e3231033ad02a7c831df210acec32cf282 (patch)
tree071ee55723df015f08403ce321fc0568a8e5b69d
parentscripts/bootstrap-prefix: bump tree for pkgconf fix (diff)
downloadprefix-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-xscripts/auto-bootstraps/analyse_result.py20
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: