pkg-infra/show-info: dump install_{staging, target, images} info
PATCH v4 1/1 pkg-infra/show-info: dump install_{staging, target, images} info
provide info if the package will be installed to staging/target/images destinations. Might be useful for analyzing the packages which installed for target/staging/images.
---
v4:
1) use "install_{target,staging,images}" property name format (suggested by Arnout Vandecappelle)
2) add and use macro for YES/NO -> true/false conversion (suggested by Arnout Vandecappelle)
3) add "install_images" property (suggested by Yann E. Morin)
v3:
1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)
v2:
1) use oneliner 'if' to dump install_{staging,target} properties
package/pkg-utils.mk | 8 ++++++++ 1 file changed, 8 insertions(+)
package/pkg-utils.mk +8 -0
@@ -62,6 +62,11 @@ $$(error Package error: use $(2) instead of $(1). Please fix your .mk file) endif endef +# $(1): YES or NO +define yesno-to-bool + $(subst NO,false,$(subst YES,true,$(1))) +endef + # json-info -- return package or filesystem metadata formatted as an entry # of a JSON dictionnary # $(1): upper-case package or filesystem name
@@ -94,6 +99,9 @@ endef define _json-info-pkg-details "version": "$($(1)_DL_VERSION)", "licenses": "$($(1)_LICENSE)", + "install_target": $(call yesno-to-bool,$($(1)_INSTALL_TARGET)), + "install_staging": $(call yesno-to-bool,$($(1)_INSTALL_STAGING)), + "install_images": $(call yesno-to-bool,$($(1)_INSTALL_IMAGES)), "downloads": [ $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)), {
Signature · 1 line
2.17.1
Thomas Petazzoni
AppliedPATCH v4 1/1 pkg-infra/show-info: dump install_{staging, target, images} info
Quoted 6 lines · On Tue, 6 Aug 2019 14:02:03 +0300 Vadim Kochan <[email protected]> wrote:
provide info if the package will be installed to staging/target/images destinations. Might be useful for analyzing the packages which installed for target/staging/images.
Signed-off-by Vadim Kochan <[email protected]>---
Applied to master with a reworked commit log. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com