diff mbox series

[14/16,v2] core/show-info: also export source and stamp directories in show-info

Message ID ed84a285abd5f0aaff890734677bd099473e524e.1636810092.git.yann.morin.1998@free.fr
State Accepted
Headers show
Series core: add show-vars, a json-formatted equivalent to printvars (branch yem/show-vars) | expand

Commit Message

Yann E. MORIN Nov. 13, 2021, 1:28 p.m. UTC
External tools may need to peek into the source tree (to check what the
list of patches that were applied), or in the stamp directory (to check
and report on the progress of a build)

Currently, both locations are identical, but semantically different and
an internal implementation detail. Exposing both separately will llow us
to change either without breaking users' scripts. Hopefully.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/pkg-utils.mk | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Petazzoni Dec. 30, 2021, 8:45 p.m. UTC | #1
On Sat, 13 Nov 2021 14:28:25 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> External tools may need to peek into the source tree (to check what the
> list of patches that were applied), or in the stamp directory (to check
> and report on the progress of a build)
> 
> Currently, both locations are identical, but semantically different and
> an internal implementation detail. Exposing both separately will llow us
> to change either without breaking users' scripts. Hopefully.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>

I was not too sure on this one, but applied anyway.

Thomas
diff mbox series

Patch

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index da123a6ed2..37a4d244d7 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -114,6 +114,8 @@  define _json-info-pkg
 		$(call _json-info-pkg-details,$(1)) \
 	)
 	"overriden": $(if $($(1)_OVERRIDE_SRCDIR),true,false),
+	"stamp_dir": $(call mk-json-str,$(patsubst $(CONFIG_DIR)/%,%,$($(1)_DIR))),
+	"source_dir": $(call mk-json-str,$(patsubst $(CONFIG_DIR)/%,%,$($(1)_DIR))),
 	"build_dir": $(call mk-json-str,$(patsubst $(CONFIG_DIR)/%,%,$($(1)_BUILDDIR))),
 	$(if $(filter target,$($(1)_TYPE)), \
 		"install_target": $(call yesno-to-bool,$($(1)_INSTALL_TARGET))$(comma) \