summaryrefslogtreecommitdiff
path: root/classes/mlinux_metadata_scm.bbclass
blob: e3949103a644dab9162e01954c8d957aec7506fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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