From ef92164fb299b69357b13ca89d2fcfe64c7b6ab0 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 12 Mar 2015 14:48:17 +0100 Subject: [PATCH] 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 --- meta-digi-dey/classes/dey-image.bbclass | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/meta-digi-dey/classes/dey-image.bbclass b/meta-digi-dey/classes/dey-image.bbclass index bd45cd9d9..f33d77bb5 100644 --- a/meta-digi-dey/classes/dey-image.bbclass +++ b/meta-digi-dey/classes/dey-image.bbclass @@ -2,30 +2,13 @@ # # Copyright (C) 2012 Digi International. -## Auxiliar variables and functions (used in dey_rootfs_tuning) -LAYERS_REV = "${@'\n'.join(get_layers_branch_rev(d))}" -DEY_TAG = "${@dey_tag(d).strip()}" -def dey_tag(d): - 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 "" +# +# Add build info to rootfs images (/etc/build) +# +inherit image-buildinfo ## DEY rootfs final 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. ## command: echo -n 'root' | mkpasswd -5 -s