aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2021-01-31 14:38:13 +0100
committerGravatar Yann E. MORIN <yann.morin.1998@free.fr>2021-01-31 22:12:54 +0100
commit0cfa1659487fe7a67d3d03a083b849d23b106e4c (patch)
treeae9888112ecfc79b7d26b57cc47df6b6dc784245
parent34c948bc60e197eb0a8741dac87ad0932f07296e (diff)
downloadbuildroot-0cfa1659487fe7a67d3d03a083b849d23b106e4c.tar.gz
buildroot-0cfa1659487fe7a67d3d03a083b849d23b106e4c.tar.bz2
package/pkg-utils.mk: introduce "name" field in show-info output
The keys of the JSON dict returned by "make show-info" is the package name, including the "host-" prefix for host packages. However, it is sometimes useful to get the actual name of the package, without the "host-" prefix, so we add a "name" property that holds the "raw name" of the package. Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
-rw-r--r--package/pkg-utils.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 11090cb628..d94041de24 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -96,6 +96,7 @@ 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)), \