package/pkg-utils: show-info: report the package build directory
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 11 Apr 2020 08:12:29 +0000 (10:12 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 25 Apr 2020 13:08:09 +0000 (15:08 +0200)
Some people want to be able to inspect the current state of the build,
and report information about it, like:
  - report the number of packages already built out of the total,
  - list the packages being actually built (e.g. for TLPB)
  - etc...

However, the location where a package is built is inherently an internal
detail, so expose that to the user in the output of show-info. We only
expose the location relative to the base directory (basically, either
output/ or the user-suppiled $(O)), so that show-info does not contain
local information (the output of show-info can be shared).

Interested parties will be able to poke in there to identify the stamp
files and deduce the package's state.

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 b6c6aeeb40b63b933f59e56c1331d62a885b5d78..66504d0be20b99495bb2ab853d589ba6a88b1d07 100644 (file)
@@ -100,6 +100,7 @@ define _json-info-pkg
                "virtual": false$(comma)
                $(call _json-info-pkg-details,$(1)) \
        )
+       "build_dir": "$(patsubst $(BASE_DIR)/%,%,$($(1)_BUILDDIR))",
        $(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) \