1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-21 05:27:01 +00:00

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>
This commit is contained in:
Richard Purdie
2022-06-09 11:52:14 +01:00
parent 3ae4dd140a
commit 38a9622ba3
4 changed files with 14 additions and 18 deletions
+2 -5
View File
@@ -218,11 +218,8 @@ def get_source_date_epoch_value(d):
return oe.reproducible.epochfile_read(d.getVar('SDE_FILE'), d)
def get_layers_branch_rev(d):
layers = (d.getVar("BBLAYERS") or "").split()
layers_branch_rev = ["%-20s = \"%s:%s\"" % (os.path.basename(i), \
oe.buildcfg.get_metadata_git_branch(i, None).strip(), \
oe.buildcfg.get_metadata_git_revision(i, None)) \
for i in layers]
revisions = oe.buildcfg.get_layer_revisions(d)
layers_branch_rev = ["%-20s = \"%s:%s\"" % (r[1], r[2], r[3]) for r in revisions]
i = len(layers_branch_rev)-1
p1 = layers_branch_rev[i].find("=")
s1 = layers_branch_rev[i][p1:]