summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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