Skip to contentSkip to conversation

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

PATCH Superseded Vadim Kochan 4 participants 5 messages Jul 23, 2019 – Aug 7, 2019

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 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.

---
 package/pkg-utils.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/pkg-utils.mk +8 -0
index b7280e930f..81222565bf 100644
@@ -94,6 +94,14 @@ endef
 define _json-info-pkg-details
 	"version": "$($(1)_DL_VERSION)",
 	"licenses": "$($(1)_LICENSE)",
+	$(if $($(1)_INSTALL_TARGET), \
+		"install_target": true$(comma),
+		"install_target": false$(comma)
+	)
+	$(if $($(1)_INSTALL_STAGING), \
+		"install_staging": true$(comma),
+		"install_staging": false$(comma)
+	)
 	"downloads": [
 	$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
 		{
Signature · 1 line
2.17.1
#1 lore raw

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

Quoted 15 lines · On Tue, 23 Jul 2019 15:33:55 +0300 Vadim Kochan <[email protected]> wrote:

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.

---
 package/pkg-utils.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/pkg-utils.mk +0 -0
index b7280e930f..81222565bf 100644
@@ -94,6 +94,14 @@ endef
 define _json-info-pkg-details

package/pkg-utils.mk endef · line 104

Quoted 10 lines
package/pkg-utils.mk +8 -0
 	"version": "$($(1)_DL_VERSION)",
 	"licenses": "$($(1)_LICENSE)",
+	$(if $($(1)_INSTALL_TARGET), \
+		"install_target": true$(comma),
+		"install_target": false$(comma)
+	)
+	$(if $($(1)_INSTALL_STAGING), \
+		"install_staging": true$(comma),
+		"install_staging": false$(comma)
+	)

I would prefer install-target and install-staging for the JSON property names, I prefer - over _.

Also, maybe you can write it like this:

	"install-target": $(if $($(1)_INSTALL_TARGET),true,false),
	"install-staging": $(if $($(1)_INSTALL_STAGING),true,false),

Note: I haven't thought about whether those properties are actually useful or not to have in the JSON output. I mainly react to the implementation details.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

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

On 2019-07-23 14:44 +0200, Thomas Petazzoni spake thusly:

Quoted 23 lines
Quoted 20 lines · On Tue, 23 Jul 2019 15:33:55 +0300 Vadim Kochan <[email protected]> wrote:

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.

---
 package/pkg-utils.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/pkg-utils.mk +3 -0
index b7280e930f..81222565bf 100644
@@ -94,6 +94,14 @@ endef
 define _json-info-pkg-details
 	"version": "$($(1)_DL_VERSION)",
 	"licenses": "$($(1)_LICENSE)",
+	$(if $($(1)_INSTALL_TARGET), \
+		"install_target": true$(comma),
+		"install_target": false$(comma)
Quoted 8 lines

package/pkg-utils.mk endef · line 104

Quoted 5 lines
package/pkg-utils.mk +5 -0
+	)
+	$(if $($(1)_INSTALL_STAGING), \
+		"install_staging": true$(comma),
+		"install_staging": false$(comma)
+	)

I would prefer install-target and install-staging for the JSON property names, I prefer - over _.

I do too, but Thomas DS. suggested we use _ and that's what we have in "reverse_depenencies".

Quoted 4 lines

Also, maybe you can write it like this:

	"install-target": $(if $($(1)_INSTALL_TARGET),true,false),
	"install-staging": $(if $($(1)_INSTALL_STAGING),true,false),

+1

Quoted 3 lines

Note: I haven't thought about whether those properties are actually useful or not to have in the JSON output. I mainly react to the implementation details.

I think it is interesting to have.

Regards,
Yann E. MORIN.

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

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

Vadim, Thomas, All,

On 2019-07-28 11:56 +0200, Yann E. MORIN spake thusly:

Quoted 6 lines

On 2019-07-23 14:44 +0200, Thomas Petazzoni spake thusly:

Quoted 5 lines
Quoted 3 lines · On Tue, 23 Jul 2019 15:33:55 +0300 Vadim Kochan <[email protected]> wrote:

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.

[--SNIP--]

Quoted 4 lines
Quoted 3 lines

Also, maybe you can write it like this:

	"install-target": $(if $($(1)_INSTALL_TARGET),true,false),
	"install-staging": $(if $($(1)_INSTALL_STAGING),true,false),

+1

And I missed Carlos' reply that this does not work, in fact. So maybe something like:

    $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false)

Regards,
Yann E. MORIN.

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 1/1 pkg-infra/show-info: dump install_{staging, target} info

In reply to Thomas Petazzoni
Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Quoted 20 lines · On Tue, 23 Jul 2019 15:33:55 +0300 Vadim Kochan <[email protected]> wrote:

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.

---
package/pkg-utils.mk | 8 ++++++++

1 file changed, 8 insertions(+)
package/pkg-utils.mk +0 -0
index b7280e930f..81222565bf 100644
@@ -94,6 +94,14 @@ endef

define _json-info-pkg-details
"version": "$($(1)_DL_VERSION)",
"licenses": "$($(1)_LICENSE)",

package/pkg-utils.mk +3 -0
+	$(if $($(1)_INSTALL_TARGET), \
+		"install_target": true$(comma),
+		"install_target": false$(comma)
Quoted 8 lines

package/pkg-utils.mk endef · line 104

Quoted 5 lines
package/pkg-utils.mk +5 -0
+	)
+	$(if $($(1)_INSTALL_STAGING), \
+		"install_staging": true$(comma),
+		"install_staging": false$(comma)
+	)

I would prefer install-target and install-staging for the JSON property names, I prefer - over _.

Notice that some programming languages handle json like variables (object.property.subproperty), and '-' is typically not allowed in variable names.

Signature · 1 line
Bye, Peter Korsgaard