diff --git a/meta-citadel-distro/classes/showvars.bbclass b/meta-citadel-distro/classes/showvars.bbclass new file mode 100644 index 0000000..18f8163 --- /dev/null +++ b/meta-citadel-distro/classes/showvars.bbclass @@ -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)) +} diff --git a/meta-citadel-distro/recipes-misc/showvars/showvars.bb b/meta-citadel-distro/recipes-misc/showvars/showvars.bb new file mode 100644 index 0000000..115e4fc --- /dev/null +++ b/meta-citadel-distro/recipes-misc/showvars/showvars.bb @@ -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