From 00c7e684374e8dbdd8ed12e29accc6be9a58831d Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 26 May 2018 11:17:53 +0200 Subject: image_type_tezi: move DATE dereferencing into IMAGE_CMD_teziimg This works around bitbake throwing the following error: | ERROR: When reparsing ...angstrom-lxqt-image.bb.do_image, | the basehash value changed from b2871a71bd4873d31d3fe7de755c753f to 5cf887f9a6518e8cf668fd3f435d1fc1. | The metadata is not deterministic and this needs to be fixed. It looks like the vardepsexclude flag is ignored in general python functions. Compare also with openembedded-core commit ecbc1db7ed1f9848dee69507de8eb289b8ddeba0 and follow-up extensions which uses a different workaround for the do_image code. Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler --- classes/image_type_tezi.bbclass | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass index 92851f7..958d050 100644 --- a/classes/image_type_tezi.bbclass +++ b/classes/image_type_tezi.bbclass @@ -164,7 +164,8 @@ python rootfs_tezi_json() { from datetime import datetime deploydir = d.getVar('DEPLOY_DIR_IMAGE', True) - release_date = datetime.strptime(d.getVar('DATE', True), '%Y%m%d').date().isoformat() + # patched in IMAGE_CMD_teziimg() below + release_date = "%release_date%" data = OrderedDict({ "config_format": 2, "autoinstall": False }) @@ -211,6 +212,12 @@ python () { IMAGE_CMD_teziimg () { bbnote "Create bootfs tarball" + # Fixup release_date in image.json, convert ${DATE} to isoformat + # This works around the non fatal ERRORS: "the basehash value changed" when DATE is referenced + # in a python prefunction to do_image + ISODATE=`echo ${DATE} | sed 's/\(....\)\(..\)\(..\)/\1-\2-\3/'` + sed -i "s/%release_date%/$ISODATE/" ${DEPLOY_DIR_IMAGE}/image.json + # Create list of device tree files if test -n "${KERNEL_DEVICETREE}"; then for DTS_FILE in ${KERNEL_DEVICETREE}; do -- cgit v1.2.3