1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-15 15:37:03 +00:00

classes/buildcfg: Move git/layer revision code into new OE module buildcfg

There is a load of duplicated git/layer/revision code which makes
most sesne as a python library, not bbclass code. Start to refactor as such.

(From OE-Core rev: 439cdf8a1e52fd2c4dc81dc40ce7e6af282ce7ac)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-06-09 11:23:30 +01:00
parent 5ed5a3cc8a
commit ba85bb6055
6 changed files with 52 additions and 50 deletions
+5 -4
View File
@@ -7,12 +7,11 @@ inherit staging
inherit mirrors
inherit utils
inherit utility-tasks
inherit metadata_scm
inherit logging
OE_EXTRA_IMPORTS ?= ""
OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible oe.rust ${OE_EXTRA_IMPORTS}"
OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible oe.rust oe.buildcfg ${OE_EXTRA_IMPORTS}"
OE_IMPORTS[type] = "list"
PACKAGECONFIG_CONFARGS ??= ""
@@ -35,6 +34,8 @@ def oe_import(d):
# We need the oe module name space early (before INHERITs get added)
OE_IMPORTED := "${@oe_import(d)}"
inherit metadata_scm
def lsb_distro_identifier(d):
adjust = d.getVar('LSB_DISTRO_ADJUST')
adjust_func = None
@@ -219,8 +220,8 @@ def get_source_date_epoch_value(d):
def get_layers_branch_rev(d):
layers = (d.getVar("BBLAYERS") or "").split()
layers_branch_rev = ["%-20s = \"%s:%s\"" % (os.path.basename(i), \
base_get_metadata_git_branch(i, None).strip(), \
base_get_metadata_git_revision(i, None)) \
oe.buildcfg.get_metadata_git_branch(i, None).strip(), \
oe.buildcfg.get_metadata_git_revision(i, None)) \
for i in layers]
i = len(layers_branch_rev)-1
p1 = layers_branch_rev[i].find("=")