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:
parent
775c004ecb
commit
42c341cbb9
17
meta-citadel-distro/classes/showvars.bbclass
Normal file
17
meta-citadel-distro/classes/showvars.bbclass
Normal 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))
|
||||
}
|
17
meta-citadel-distro/recipes-misc/showvars/showvars.bb
Normal file
17
meta-citadel-distro/recipes-misc/showvars/showvars.bb
Normal 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
|
Loading…
Reference in New Issue
Block a user