package/pkg-utils: show-info: do not show install types for host packages
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 11 Apr 2020 08:12:26 +0000 (10:12 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 25 Apr 2020 12:56:11 +0000 (14:56 +0200)
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.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Vadim Kochan <vadim4j@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: eeppeliteloop@gmail.com
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/pkg-utils.mk

index d324934dbad0b4bfcc0f545e7e1bd6f72af72cd6..14101fcc2aba66d7000cffbd65a849ab061cee65 100644 (file)
@@ -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)),
                {