From 38a9622ba35f674f66bc9e74512805f4834b606d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 9 Jun 2022 11:52:14 +0100 Subject: 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 --- meta/lib/oe/buildcfg.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta/lib/oe') 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): # (expected) return code 1 in a modified git repo. For example, we get # output and a 129 return code when a layer isn't a git repo at all. return " -- modified" + +def get_layer_revisions(d): + layers = (d.getVar("BBLAYERS") or "").split() + revisions = [] + for i in layers: + revisions.append((i, os.path.basename(i), get_metadata_git_branch(i, None).strip(), get_metadata_git_revision(i, None), is_layer_modified(i))) + return revisions -- cgit v1.2.3-54-g00ecf