Skip to contentSkip to conversation

core/show-info: do not show install types for host packages

PATCH New Yann E. MORIN 1 participant 2 messages Apr 9, 2020 – Apr 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core/show-info: do not show install types for host packages

By their very nature, host packages have no target, staging, or images install steps; they have a single install step, that is always performed.

However, we currently report those three types of install, which is misleading at best, and really incorrect.

If we were to report any install type for host package, that would be a single one, and it would always be true.

So, do not report any install type for host packages, as it does not make sense to report anything that is always true.

Cc Vadim Kochan <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
---
 package/pkg-utils.mk | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
package/pkg-utils.mk +5 -3
index d324934dba..14101fcc2a 100644
@@ -112,9 +112,11 @@ define _json-info-pkg-details
 	"version": "$($(1)_DL_VERSION)",
 	"licenses": "$($(1)_LICENSE)",
 	"dl_dir": "$($(1)_DL_SUBDIR)",
-	"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)),
+	$(if $(filter target,$($(1)_TYPE)), \
+		"install_target": $(call yesno-to-bool,$($(1)_INSTALL_TARGET))$(comma) \
+		"install_staging": $(call yesno-to-bool,$($(1)_INSTALL_STAGING))$(comma) \
+		"install_images": $(call yesno-to-bool,$($(1)_INSTALL_IMAGES))$(comma) \
+	)
 	"downloads": [
 	$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
 		{
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 core/show-info: do not show install types for host packages

All,

On 2020-04-09 22:58 +0200, Yann E. MORIN spake thusly:

Quoted 27 lines

By their very nature, host packages have no target, staging, or images install steps; they have a single install step, that is always performed.

However, we currently report those three types of install, which is misleading at best, and really incorrect.

If we were to report any install type for host package, that would be a single one, and it would always be true.

So, do not report any install type for host packages, as it does not make sense to report anything that is always true.

Cc Vadim Kochan <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
---
 package/pkg-utils.mk | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
package/pkg-utils.mk +0 -0
index d324934dba..14101fcc2a 100644
@@ -112,9 +112,11 @@ define _json-info-pkg-details
 	"version": "$($(1)_DL_VERSION)",

package/pkg-utils.mk define _json-info-pkg-details · line 119

Quoted 10 lines
package/pkg-utils.mk +5 -3
 	"licenses": "$($(1)_LICENSE)",
 	"dl_dir": "$($(1)_DL_SUBDIR)",
-	"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)),
+	$(if $(filter target,$($(1)_TYPE)), \
+		"install_target": $(call yesno-to-bool,$($(1)_INSTALL_TARGET))$(comma) \
+		"install_staging": $(call yesno-to-bool,$($(1)_INSTALL_STAGING))$(comma) \
+		"install_images": $(call yesno-to-bool,$($(1)_INSTALL_IMAGES))$(comma) \
+	)

There is more to it than just this, so I'll be sending a revised series about show-info.

Patch marked as changes requestd in patchwork.

Regards,
Yann E. MORIN.

Quoted 6 lines
package/pkg-utils.mk +0 -0
 	"downloads": [
 	$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
 		{
Signature · 1 line
2.20.1
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.  |
'------------------------------^-------^------------------^--------------------'