1
0
forked from brl/citadel

Added showvars utility class for debugging.

Class can be added to any recipe and will create a target
called 'showvars' which will dump out all of the variable
values in a much simpler list than 'bitbake -e'
This commit is contained in:
brl 2017-12-12 15:28:19 -05:00
parent 775c004ecb
commit 42c341cbb9
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,17 @@
addtask showvars
do_showvars[nostamp] = "1"
python do_showvars() {
# emit only the metadata that are variables but not functions
isfunc = lambda key: bool(d.getVarFlag(key, 'func'))
vars = sorted((key for key in bb.data.keys(d) if not key.startswith('__')))
for var in vars:
if not isfunc(var):
try:
val = d.getVar(var, True)
except Exception as exc:
bb.plain('Expansion of %s threw %s: %s' % (var, exc.__class__.__name__, str(exc)))
bb.plain('%s="%s"' % (var,val))
}

View File

@ -0,0 +1,17 @@
SUMMARY = "Display variables"
LICENSE = "MIT"
INHIBIT_DEFAULT_DEPS = "1"
PACKAGES = ""
deltask do_fetch
deltask do_unpack
deltask do_patch
deltask do_configure
deltask do_compile
deltask do_install
deltask do_populate_sysroot
inherit showvars nopackages