summaryrefslogtreecommitdiff
path: root/classes/mlinux_metadata_scm.bbclass
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-11-11 14:22:06 -0600
committerJohn Klug <john.klug@multitech.com>2020-11-11 14:22:06 -0600
commitd75cc859d0009649aa5c97731933b50ba48231ba (patch)
treefbd1fac00b1f4a4b5688352f402335918f7c4807 /classes/mlinux_metadata_scm.bbclass
downloadmeta-mlinux-atmel-d75cc859d0009649aa5c97731933b50ba48231ba.tar.gz
meta-mlinux-atmel-d75cc859d0009649aa5c97731933b50ba48231ba.tar.bz2
meta-mlinux-atmel-d75cc859d0009649aa5c97731933b50ba48231ba.zip
MultiTech mLinux Atmel distribution OpenEmbedded layer5.3.0a
Diffstat (limited to 'classes/mlinux_metadata_scm.bbclass')
-rw-r--r--classes/mlinux_metadata_scm.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/mlinux_metadata_scm.bbclass b/classes/mlinux_metadata_scm.bbclass
new file mode 100644
index 0000000..b220344
--- /dev/null
+++ b/classes/mlinux_metadata_scm.bbclass
@@ -0,0 +1,14 @@
+MLINUX_METADATA_REVISION = "${@base_get_metadata_git_revision("${OEROOT}",None)}"
+MLINUX_METADATA_BRANCH = "${@base_get_metadata_git_branch("${OEROOT}",None).strip()}"
+MLINUX_LAYERS = "${@mlinux_layers(bb,d)}"
+
+def mlinux_layers(bb, d):
+ layers = (d.getVar("BBLAYERS", d, 1) or "").split()
+ layer_revs = ""
+
+ for layer in layers:
+ branch = base_get_metadata_git_branch(layer, d).strip()
+ rev = base_get_metadata_git_revision(layer, d)
+ layer_revs += "%-20s = %s:%s\n" % (os.path.basename(layer), branch, rev)
+
+ return layer_revs