meta-digi-dey: use 'image-buildinfo' to create '/etc/build'
Poky added a new class that provides the same functionality we implemented in our 'dey-image' class. So just use that class instead of reimplementing it in our layer. https://jira.digi.com/browse/DEL-1558 Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
8b2e4812fc
commit
ef92164fb2
|
|
@ -2,30 +2,13 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2012 Digi International.
|
# Copyright (C) 2012 Digi International.
|
||||||
|
|
||||||
## Auxiliar variables and functions (used in dey_rootfs_tuning)
|
#
|
||||||
LAYERS_REV = "${@'\n'.join(get_layers_branch_rev(d))}"
|
# Add build info to rootfs images (/etc/build)
|
||||||
DEY_TAG = "${@dey_tag(d).strip()}"
|
#
|
||||||
def dey_tag(d):
|
inherit image-buildinfo
|
||||||
import subprocess
|
|
||||||
for layer in d.getVar('BBLAYERS', True).split():
|
|
||||||
if 'meta-digi-dey' in layer:
|
|
||||||
cmd = 'git describe --tags --exact-match 2>/dev/null || true'
|
|
||||||
return subprocess.Popen(cmd, cwd=layer, shell=True, stdout=subprocess.PIPE).stdout.read()
|
|
||||||
return ""
|
|
||||||
|
|
||||||
## DEY rootfs final tuning
|
## DEY rootfs final tuning
|
||||||
dey_rootfs_tuning() {
|
dey_rootfs_tuning() {
|
||||||
#######################################################################
|
|
||||||
## Create '/etc/build' with build statistics
|
|
||||||
#######################################################################
|
|
||||||
cat >${IMAGE_ROOTFS}/etc/build <<-_EOF_
|
|
||||||
TIMESTAMP=${DATETIME}
|
|
||||||
DEY_TAG=${DEY_TAG}
|
|
||||||
|
|
||||||
Layers revisions:
|
|
||||||
=================
|
|
||||||
${LAYERS_REV}
|
|
||||||
_EOF_
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
## Set root password to 'root' if 'debug-tweaks' is NOT enabled.
|
## Set root password to 'root' if 'debug-tweaks' is NOT enabled.
|
||||||
## command: echo -n 'root' | mkpasswd -5 -s
|
## command: echo -n 'root' | mkpasswd -5 -s
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue