summaryrefslogtreecommitdiff
path: root/classes/mlinux_metadata_scm.bbclass
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2014-11-04 11:51:34 -0600
committerJesse Gilles <jgilles@multitech.com>2014-11-04 11:51:34 -0600
commite243c30f04c18722dc65effe6d4f275a3f35de46 (patch)
tree807610ce8af0ead02681d6c3cc89d902ec941652 /classes/mlinux_metadata_scm.bbclass
downloadmeta-mlinux-e243c30f04c18722dc65effe6d4f275a3f35de46.tar.gz
meta-mlinux-e243c30f04c18722dc65effe6d4f275a3f35de46.tar.bz2
meta-mlinux-e243c30f04c18722dc65effe6d4f275a3f35de46.zip
initial commit of mLinux layer
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..e394910
--- /dev/null
+++ b/classes/mlinux_metadata_scm.bbclass
@@ -0,0 +1,14 @@
+MLINUX_METADATA_REVISION = "${@base_get_metadata_git_revision("${OETREE}",None)}"
+MLINUX_METADATA_BRANCH = "${@base_get_metadata_git_branch("${OETREE}",None).strip()}"
+MLINUX_LAYERS = "${@mlinux_layers(bb,d)}"
+
+def mlinux_layers(bb, d):
+ layers = (bb.data.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