Skip to contentSkip to conversation

pkg-infra/show-info: dump install_{staging, target} info

PATCH Superseded Vadim Kochan 3 participants 5 messages Jul 31, 2019 – Aug 6, 2019

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

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
index b7280e930f..ffe198e242 100644
@@ -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
#1 lore raw

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.

---
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 +0 -0
index b7280e930f..ffe198e242 100644

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)),
 		{
#2 lore raw

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.

---
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(+)
Quoted 10 lines

package/pkg-utils.mk endef · line 98

Quoted 10 lines
package/pkg-utils.mk +2 -0
index b7280e930f..ffe198e242 100644
@@ -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,
Arnout

Quoted 4 lines
package/pkg-utils.mk +0 -0
 	"downloads": [
 	$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
 		{
#3 lore raw

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.

---
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(+)
Quoted 13 lines
Quoted 10 lines

package/pkg-utils.mk endef · line 98

Quoted 10 lines
package/pkg-utils.mk +2 -0
index b7280e930f..ffe198e242 100644
@@ -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.

And install_target too, of course.

And please also introduce install_images.

Regards,
Yann E. MORIN.

Quoted 21 lines

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,
Arnout

Quoted 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.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

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.

---
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(+)
Quoted 13 lines
Quoted 10 lines

package/pkg-utils.mk endef · line 98

Quoted 10 lines
package/pkg-utils.mk +2 -0
index b7280e930f..ffe198e242 100644
@@ -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.

And install_target too, of course.

And please also introduce install_images.

Regards,
Yann E. MORIN.

Quoted 17 lines

Regards,
Arnout

Quoted 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