summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2018-05-26 11:17:53 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-06-18 14:49:46 +0200
commit00c7e684374e8dbdd8ed12e29accc6be9a58831d (patch)
tree43c7199ab2dd2f26455e10a1c0b94d46c027f8a4
parent7f89cc6bc513d973e53b3c5d704639e06b06da4b (diff)
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 <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--classes/image_type_tezi.bbclass9
1 files changed, 8 insertions, 1 deletions
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