-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbb-log-not-sstate
executable file
·29 lines (24 loc) · 984 Bytes
/
bb-log-not-sstate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /usr/bin/env python3
# List tasks which were not ran from sstate
# MIT licensed
import sys
import re
def log_parser(stream):
# NOTE: Running setscene task 170 of 191 (virtual:native:/home/ross/Yocto/poky/meta/recipes-support/gdbm/gdbm_1.23.bb:do_populate_sysroot_setscene)
# NOTE: Running task 313 of 785 (/home/ross/Yocto/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.1.bb:do_unpack)
task_re = re.compile(r"NOTE: Running( setscene)? task \d+ of \d+ \((?P<recipe>.+):(?P<task>.+)\)")
for line in stream:
m = task_re.search(line)
if m:
yield m.group("recipe"), m.group("task")
recipes = set()
for recipe, task in log_parser(open(sys.argv[1], encoding="utf-8")):
# Ignore setscene tasks as these pulled from sstate
if task.endswith("_setscene"):
continue
if task in ("do_rm_work",):
continue
recipes.add(recipe)
print("Built recipes:")
for t in sorted(recipes):
print(" %s" % t)