[Buildroot] [PATCH 13/16 v2] core/show-info: report whether a package is overriden

Yann E. MORIN yann.morin.1998 at free.fr
Sat Nov 13 13:28:24 UTC 2021


The show-info output can be used in quite some ways, like to assess the
validity of the current configuration, like a production build in a CI
would do for example. One such assessment would be to ensure that no
package is overriden.

Additionally, when we will (later!) want to check whether we can re-use
cached artefacts of a package, we will not want to do so for packages
that are overridden (nor would we want to actually cache such a result
either).

We do not expose the override location, because this is a purely-local
information, and show info should never contain such local information
(the output of show-info can be shared). Besides, that information is
already known by the user, as they passed it to Buildroot via local.mk
to begin with.

Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
Cc: Vadim Kochan <vadim4j at gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Cc: Arnout Vandecappelle <arnout at mind.be>
Cc: eeppeliteloop at gmail.com
---
 package/pkg-utils.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 0b0ff77419..da123a6ed2 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -113,6 +113,7 @@ define _json-info-pkg
 		"virtual": false$(comma)
 		$(call _json-info-pkg-details,$(1)) \
 	)
+	"overriden": $(if $($(1)_OVERRIDE_SRCDIR),true,false),
 	"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) \
-- 
2.25.1



More information about the buildroot mailing list