imagebuilder: Remove json_info_files/ before build
authorPaul Spooren <mail@aparcar.org>
Tue, 9 Jun 2020 04:15:05 +0000 (18:15 -1000)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 11 Jun 2020 10:12:56 +0000 (11:12 +0100)
The folder `json_info_files` contains multiple JSON files which describe
created firmware images. The folder is not removed between builds as the
ImageBuilder does not use `image.mk`.

Not removing the JSON files result in a merged `profiles.json` file
containing entries for outdated or non-existing images.

This commit adds the `json_info_files/` cleanup step to the ImageBuilder
Makefile.

Signed-off-by: Paul Spooren <mail@aparcar.org>
target/imagebuilder/files/Makefile

index 01e374856c5e3775a9a22baa01f23f3a6763d0e9..326dd2ba2f83268398df1fab8a57d109f1b1391a 100644 (file)
@@ -168,6 +168,7 @@ prepare_rootfs: FORCE
 build_image: FORCE
        @echo
        @echo Building images...
+       rm -rf $(BUILD_DIR)/json_info_files/
        $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
                $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)")