core/show-info: 'name' only applies to packages

Commit 0cfa165948 (package/pkg-utils.mk: introduce "name" field in
show-info output) did what it said, but did so in the generic show-info
part, thus it was also added to filesystems (rootfs), the other kind of
entity that show-info reports on.

Only packages have a "name"; filesystems do not. Instead, they already
have an 'image_name'.

Move the 'name' field to the package-related part of show-info.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN 2021-11-13 14:28:19 +01:00
parent cba51c7f5a
commit 471ecea5ee

View File

@ -96,7 +96,6 @@ endef
# $(1): upper-case package or filesystem name
define json-info
"$($(1)_NAME)": {
"name": "$($(1)_RAWNAME)",
"type": "$($(1)_TYPE)",
$(if $(filter rootfs,$($(1)_TYPE)), \
$(call _json-info-fs,$(1)), \
@ -108,6 +107,7 @@ endef
# _json-info-pkg, _json-info-pkg-details, _json-info-fs: private helpers
# for json-info, above
define _json-info-pkg
"name": "$($(1)_RAWNAME)",
$(if $($(1)_IS_VIRTUAL), \
"virtual": true$(comma),
"virtual": false$(comma)