diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-09 11:52:14 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-11 10:30:57 +0100 |
commit | 38a9622ba35f674f66bc9e74512805f4834b606d (patch) | |
tree | 1f28ec109f11b51863e3f551b470addaf896212c /meta/lib/oe | |
parent | 3ae4dd140a76acb64d776be925f5e56ac67746e0 (diff) | |
download | poky-38a9622ba35f674f66bc9e74512805f4834b606d.tar.gz |
base/buildhistory/image-buildinfo: Use common buildcfg function
Reduce code duplication to a common function in oe.buildcfg.
(From OE-Core rev: 0b191a1df4c3722defb09dde0c16b1d9e7fe7ef6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/buildcfg.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oe/buildcfg.py b/meta/lib/oe/buildcfg.py index 364c40a2f0..90f5e05715 100644 --- a/meta/lib/oe/buildcfg.py +++ b/meta/lib/oe/buildcfg.py | |||
@@ -40,3 +40,10 @@ def is_layer_modified(path): | |||
40 | # (expected) return code 1 in a modified git repo. For example, we get | 40 | # (expected) return code 1 in a modified git repo. For example, we get |
41 | # output and a 129 return code when a layer isn't a git repo at all. | 41 | # output and a 129 return code when a layer isn't a git repo at all. |
42 | return " -- modified" | 42 | return " -- modified" |
43 | |||
44 | def get_layer_revisions(d): | ||
45 | layers = (d.getVar("BBLAYERS") or "").split() | ||
46 | revisions = [] | ||
47 | for i in layers: | ||
48 | revisions.append((i, os.path.basename(i), get_metadata_git_branch(i, None).strip(), get_metadata_git_revision(i, None), is_layer_modified(i))) | ||
49 | return revisions | ||