diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-09 11:23:30 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-11 10:30:56 +0100 |
| commit | ba85bb605502a86fa83bd7a0f3d8ed644dc16a8c (patch) | |
| tree | e30bf6f81aa714fad3b9f94c0814339410b0973f /meta/classes/base.bbclass | |
| parent | 5ed5a3cc8a4d819a0af8ee59f0c960bc4de07b61 (diff) | |
| download | poky-ba85bb605502a86fa83bd7a0f3d8ed644dc16a8c.tar.gz | |
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>
Diffstat (limited to 'meta/classes/base.bbclass')
| -rw-r--r-- | meta/classes/base.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index bdb3ac33c6..f59e95fef0 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
| @@ -7,12 +7,11 @@ inherit staging | |||
| 7 | inherit mirrors | 7 | inherit mirrors |
| 8 | inherit utils | 8 | inherit utils |
| 9 | inherit utility-tasks | 9 | inherit utility-tasks |
| 10 | inherit metadata_scm | ||
| 11 | inherit logging | 10 | inherit logging |
| 12 | 11 | ||
| 13 | OE_EXTRA_IMPORTS ?= "" | 12 | OE_EXTRA_IMPORTS ?= "" |
| 14 | 13 | ||
| 15 | 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}" | 14 | 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}" |
| 16 | OE_IMPORTS[type] = "list" | 15 | OE_IMPORTS[type] = "list" |
| 17 | 16 | ||
| 18 | PACKAGECONFIG_CONFARGS ??= "" | 17 | PACKAGECONFIG_CONFARGS ??= "" |
| @@ -35,6 +34,8 @@ def oe_import(d): | |||
| 35 | # We need the oe module name space early (before INHERITs get added) | 34 | # We need the oe module name space early (before INHERITs get added) |
| 36 | OE_IMPORTED := "${@oe_import(d)}" | 35 | OE_IMPORTED := "${@oe_import(d)}" |
| 37 | 36 | ||
| 37 | inherit metadata_scm | ||
| 38 | |||
| 38 | def lsb_distro_identifier(d): | 39 | def lsb_distro_identifier(d): |
| 39 | adjust = d.getVar('LSB_DISTRO_ADJUST') | 40 | adjust = d.getVar('LSB_DISTRO_ADJUST') |
| 40 | adjust_func = None | 41 | adjust_func = None |
| @@ -219,8 +220,8 @@ def get_source_date_epoch_value(d): | |||
| 219 | def get_layers_branch_rev(d): | 220 | def get_layers_branch_rev(d): |
| 220 | layers = (d.getVar("BBLAYERS") or "").split() | 221 | layers = (d.getVar("BBLAYERS") or "").split() |
| 221 | layers_branch_rev = ["%-20s = \"%s:%s\"" % (os.path.basename(i), \ | 222 | layers_branch_rev = ["%-20s = \"%s:%s\"" % (os.path.basename(i), \ |
| 222 | base_get_metadata_git_branch(i, None).strip(), \ | 223 | oe.buildcfg.get_metadata_git_branch(i, None).strip(), \ |
| 223 | base_get_metadata_git_revision(i, None)) \ | 224 | oe.buildcfg.get_metadata_git_revision(i, None)) \ |
| 224 | for i in layers] | 225 | for i in layers] |
| 225 | i = len(layers_branch_rev)-1 | 226 | i = len(layers_branch_rev)-1 |
| 226 | p1 = layers_branch_rev[i].find("=") | 227 | p1 = layers_branch_rev[i].find("=") |
