package/pkg-utils: show-info: virtual packages can also install things
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 11 Apr 2020 08:12:28 +0000 (10:12 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 25 Apr 2020 12:59:19 +0000 (14:59 +0200)
Although most virtual packages do not install anything, some of them
do. For example, the virtual package 'toolchain' does tweak the musl
headers during a post staging hook.

So, it makes sense for "show-info" to report if a virtual package has
its target, staging and/or image installation steps enabled or not.

This commit changes show-info to report the type of install steps for
virtual packages too, which means for all packages.

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 14101fcc2aba66d7000cffbd65a849ab061cee65..b6c6aeeb40b63b933f59e56c1331d62a885b5d78 100644 (file)
@@ -100,6 +100,11 @@ define _json-info-pkg
                "virtual": false$(comma)
                $(call _json-info-pkg-details,$(1)) \
        )
+       $(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) \
+       )
        "dependencies": [
                $(call make-comma-list,$(sort $($(1)_FINAL_ALL_DEPENDENCIES)))
        ],
@@ -112,11 +117,6 @@ define _json-info-pkg-details
        "version": "$($(1)_DL_VERSION)",
        "licenses": "$($(1)_LICENSE)",
        "dl_dir": "$($(1)_DL_SUBDIR)",
-       $(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)),
                {