pkg-infra/show-info: dump install_{staging, target} info
PATCH v3 1/1 pkg-infra/show-info: dump install_{staging, target} info
provide info if the package will be installed to staging/target destinations. Might be useful for analyzing the packages which installed only for target/staging.
---
v2:
1) use oneliner 'if' to dump install_{staging,target} properties
v3:
1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)
package/pkg-utils.mk | 2 ++ 1 file changed, 2 insertions(+)
package/pkg-utils.mk +2 -0
@@ -94,6 +94,8 @@ endef define _json-info-pkg-details "version": "$($(1)_DL_VERSION)", "licenses": "$($(1)_LICENSE)", + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false), + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false), "downloads": [ $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)), {
Signature · 1 line
2.17.1
PATCH v3 1/1 pkg-infra/show-info: dump install_{staging, target} info
Hi Vadim,
Sorry to come with yet another comment in v3 of this extremely simple patch :-)
Quoted 20 lines · Vadim Kochan
provide info if the package will be installed to staging/target destinations. Might be useful for analyzing the packages which installed only for target/staging.
Signed-off-by Vadim Kochan <[email protected]>---
v2:
1) use oneliner 'if' to dump install_{staging,target} propertiesv3:
1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)package/pkg-utils.mk | 2 ++ 1 file changed, 2 insertions(+)package/pkg-utils.mk +0
-0
package/pkg-utils.mk endef · line 98
Quoted 5 lines
package/pkg-utils.mk +2
-0@@ -94,6 +94,8 @@ endef define _json-info-pkg-details "version": "$($(1)_DL_VERSION)", "licenses": "$($(1)_LICENSE)", + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false), + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),
I still find this ugly.
Could you instead add a macro that does something like
$(subst NO,false,$(subst YES,true,$(1)))
and use that?
It may also be handy in other situations.
I'm not sure what to call it, maybe bool-to-json or yesno-to-bool
Regards,
Arnout
Quoted 4 lines
package/pkg-utils.mk +0
-0"downloads": [ $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)), {
PATCH v3 1/1 pkg-infra/show-info: dump install_{staging, target} info
Quoted 20 lines · Arnout Vandecappelle
Hi Vadim,
Sorry to come with yet another comment in v3 of this extremely simple patch :-)
Quoted 15 lines · Vadim Kochan
provide info if the package will be installed to staging/target destinations. Might be useful for analyzing the packages which installed only for target/staging.
Signed-off-by Vadim Kochan <[email protected]>---
v2:
1) use oneliner 'if' to dump install_{staging,target} propertiesv3:
1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)package/pkg-utils.mk | 2 ++ 1 file changed, 2 insertions(+)
Quoted 10 lines
package/pkg-utils.mk endef · line 98
Quoted 10 lines
package/pkg-utils.mk +2
-0@@ -94,6 +94,8 @@ endef define _json-info-pkg-details "version": "$($(1)_DL_VERSION)", "licenses": "$($(1)_LICENSE)", + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false), + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),
Oh, also, someone commented that you should keep install_staging with
underscore because we already have reverse_dependencies.
Regards,
Arnout
Quoted 18 lines
I still find this ugly.
Could you instead add a macro that does something like
$(subst NO,false,$(subst YES,true,$(1)))
and use that?It may also be handy in other situations.
I'm not sure what to call it, maybe bool-to-json or yesno-to-bool
Regards,
ArnoutQuoted 4 lines
package/pkg-utils.mk +0
-0"downloads": [ $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)), {
PATCH v3 1/1 pkg-infra/show-info: dump install_{staging, target} info
Arnout, Vadim, All,
On 2019-08-02 22:43 +0200, Arnout Vandecappelle spake thusly:
Quoted 17 lines · Arnout Vandecappelle
Quoted 16 lines · Vadim Kochan
Quoted 15 lines
provide info if the package will be installed to staging/target destinations. Might be useful for analyzing the packages which installed only for target/staging.
Signed-off-by Vadim Kochan <[email protected]>---
v2:
1) use oneliner 'if' to dump install_{staging,target} propertiesv3:
1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)package/pkg-utils.mk | 2 ++ 1 file changed, 2 insertions(+)
Quoted 13 lines
Quoted 10 lines
package/pkg-utils.mk endef · line 98
Quoted 10 lines
package/pkg-utils.mk +2
-0@@ -94,6 +94,8 @@ endef define _json-info-pkg-details "version": "$($(1)_DL_VERSION)", "licenses": "$($(1)_LICENSE)", + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false), + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),Oh, also, someone commented that you should keep
install_stagingwith
underscore because we already havereverse_dependencies.
And install_target too, of course.
And please also introduce install_images.
Regards,
Yann E. MORIN.
Quoted 21 lines
Regards,
ArnoutQuoted 18 lines
I still find this ugly.
Could you instead add a macro that does something like
$(subst NO,false,$(subst YES,true,$(1)))
and use that?It may also be handy in other situations.
I'm not sure what to call it, maybe bool-to-json or yesno-to-bool
Regards,
ArnoutQuoted 4 lines
package/pkg-utils.mk +0
-0"downloads": [ $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)), {
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/1 pkg-infra/show-info: dump install_{staging, target} info
Arnout, Yann, All
Quoted 59 lines · Yann E. MORIN
Arnout, Vadim, All,
On 2019-08-02 22:43 +0200, Arnout Vandecappelle spake thusly:
Quoted 17 lines · Arnout Vandecappelle
Quoted 16 lines · Vadim Kochan
Quoted 15 lines
provide info if the package will be installed to staging/target destinations. Might be useful for analyzing the packages which installed only for target/staging.
Signed-off-by Vadim Kochan <[email protected]>---
v2:
1) use oneliner 'if' to dump install_{staging,target} propertiesv3:
1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)package/pkg-utils.mk | 2 ++ 1 file changed, 2 insertions(+)Quoted 13 lines
Quoted 10 lines
package/pkg-utils.mk endef · line 98
Quoted 10 lines
package/pkg-utils.mk +2
-0@@ -94,6 +94,8 @@ endef define _json-info-pkg-details "version": "$($(1)_DL_VERSION)", "licenses": "$($(1)_LICENSE)", + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false), + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),Oh, also, someone commented that you should keep
install_stagingwith
underscore because we already havereverse_dependencies.And
install_targettoo, of course.And please also introduce
install_images.Regards,
Yann E. MORIN.Quoted 17 lines
Regards,
ArnoutQuoted 14 lines
I still find this ugly.
Could you instead add a macro that does something like
$(subst NO,false,$(subst YES,true,$(1)))
and use that?It may also be handy in other situations.
I'm not sure what to call it, maybe bool-to-json or yesno-to-bool
Regards,
Arnout
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
package/pkg-utils.mk endef · line 101
Quoted 4 lines
package/pkg-utils.mk +0
-0"downloads": [ $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)), {--
Thanks for the comments, will do it.
Regards,
Vadim Kochan