package/pkg-utils.mk: expose CPE ID in show-info when available

This commit exposes a new per-package property in the "make show-info"
JSON output: "cpe-id", which exists when a valid CPE ID is available
for the package.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Thomas Petazzoni 2020-11-04 15:51:39 +01:00
parent db24c08bea
commit c02d465274

View File

@ -119,6 +119,9 @@ define _json-info-pkg
"reverse_dependencies": [ "reverse_dependencies": [
$(call make-comma-list,$(sort $($(1)_RDEPENDENCIES))) $(call make-comma-list,$(sort $($(1)_RDEPENDENCIES)))
] ]
$(if $($(1)_CPE_ID_VALID), \
$(comma) "cpe-id": "$($(1)_CPE_ID)" \
)
$(if $($(1)_IGNORE_CVES), $(if $($(1)_IGNORE_CVES),
$(comma) "ignore_cves": [ $(comma) "ignore_cves": [
$(call make-comma-list,$(sort $($(1)_IGNORE_CVES))) $(call make-comma-list,$(sort $($(1)_IGNORE_CVES)))