core/show-info: report image name of filesystems
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 11 Apr 2020 08:12:33 +0000 (10:12 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 27 Jul 2021 20:05:47 +0000 (22:05 +0200)
The rootfses, unlike packages, do not have stampfiles to represent
whether they are built or not. Indeed, we always rebuild the rootfs, and
there is a single step to do.

Hpwever, people (and scripts) who want to report on the build progress,
will want to know whether each rootfs has been built already or not.

Expose in show-info the name of the file that wil contain the rootfs
image.

$(1)_FINAL_IMAGE_NAME is set by the fs infrastructure, but initramfs
doesn't use the infrastructure. So to support that one as well, set
image_name to null if $(1)_FINAL_IMAGE_NAME is not set.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Vadim Kochan <vadim4j@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: eeppeliteloop@gmail.com
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/pkg-utils.mk

index d0fcdd4e1de2bc50ee5f803225f922b8094f8133..ae3c7f9da9c2fc6de4d4776a3eb80d8f2fa1e986 100644 (file)
@@ -156,6 +156,10 @@ define _json-info-pkg-details
 endef
 
 define _json-info-fs
+       "image_name": $(if $($(1)_FINAL_IMAGE_NAME), \
+                               "$($(1)_FINAL_IMAGE_NAME)", \
+                               null \
+                       ),
        "dependencies": [
                $(call make-comma-list,$(sort $($(1)_DEPENDENCIES)))
        ]