# Copyright (C) 2009 Chris Larson # Released under the MIT license (see COPYING.MIT for the terms) # # This class uses events to capture the state of the datastore when the task # starts, and after it completes. It diffs those captured states, and emits # messages showing which variables changed, and what their values were changed # to. # # It provides a mechanism to blacklist variables you expect to change, both # globally and on a per-task basis. # # Known instances of tasks changing metadata: # # PSTAGE_PKGMANAGER changes by calls to pstage_set_pkgmanager in: # do_clean, do_setscene, do_package_stage # # Subpackage metadata, read by the pkgdata functions in base.bbclass, in: # do_package, do_package_stage, do_package_write_* TASK_METADATA_BLACKLIST = "\ __RUNQUEUE_DO_NOT_USE_EXTERNALLY \ " #TASK_METADATA_BLACKLIST_do_clean = "\ # PSTAGE_PKGMANAGER \ #" def dict_diff(olddict, newdict): diff = {} for key in set(olddict).union(set(newdict)): old = olddict.get(key) new = newdict.get(key) if old != new: diff[key] = (old, new) return diff def dict_for_data(data): newdict = {} for key in data.keys(): newdict[key] = data.getVar(key, False) return newdict def task_metadata_track_start(task, data): originaldata = dict_for_data(data) data.setVar("__originaldata_%s" % task, originaldata) def task_metadata_track_stop(task, data): from bb import note pf = data.getVar("PF", True) def emit(msg): note("%s: %s" % (pf, msg)) originaldata = data.getVar("__originaldata_%s" % task, False) newdata = dict_for_data(data) blacklist = data.getVar("TASK_METADATA_BLACKLIST", True).split() + \ (data.getVar("TASK_METADATA_BLACKLIST_%s" % task, True) or "").split() diff = dict_diff(originaldata, newdata) diff_clean = [key for key in diff \ if not key in blacklist and \ not key.startswith("__originaldata_")] if diff_clean: emit("Variables changed by %s:" % task) for key in diff_clean: (old, new) = diff[key] emit(" %s:" % key) emit(" '%s' -> '%s'" % (old, new)) python __task_metadata_track_eh () { from bb.build import TaskStarted, TaskSucceeded if isinstance(e, TaskStarted): if e.data is None: from bb import fatal fatal("e.data is none for %s" % e) task_metadata_track_start(e.task, e.data) elif isinstance(e, TaskSucceeded): task_metadata_track_stop(e.task, e.data) } addhandler __task_metadata_track_eh addtask py_listtasks do_py_listtasks[nostamp] = "1" do_py_listtasks[recrdeptask] = "do_py_listtasks" python do_py_listtasks() { import sys for e in d.keys(): if d.getVarFlag(e, "task") and \ d.getVarFlag(e, "python"): sys.stdout.write("%s\n" % e) } 262722fdb7dc3005e65fff1f79bc3ff7a844'>linux_2.6.21.bb
AgeCommit message (Expand)AuthorFiles
2008-01-13linux 2.6.21: Update Simpad config, enable more wifi drivers and mmc support.Bernhard Guillon1
2007-10-08linux 2.6.21: replace gumstix 18bpp patch with pxa-overlay patch from RP Koen Kooi1
2007-10-07linux 2.6.21: patch tsc2003 to scan at more addressesKoen Kooi1
2007-10-072.6.21: add support for the ts controller on the console-vx-lcd gumstix boardsKoen Kooi1
2007-10-01linux : Update patches for gumstix from gumstix buildroot.Philip Balister1
2007-09-13linux : Put all defconfig information in the gumstix-verdex defconfig andPhilip Balister1
2007-09-13linux 2.6.21: remove gumstix patch that breaks busyboxKoen Kooi1
2007-09-09linux: changed way of adding uboot-mkimage dependency so #2926 should be fixedMarcin Juszkiewicz1
2007-08-23linux 2.6.21: bump PR after all those changesKoen Kooi1
2007-08-23linux 2.6.21: fix gumstix patches and verdex defconfig (works with iwmmxt now)Koen Kooi1
2007-08-22linux 2.6.21: remove localversion for gumstix to get module deps working prop...Koen Kooi1
2007-08-21linux 2.6.21: add gumstix supportKoen Kooi1
2007-07-06Simpad updates taken from Henning Heinold1
2007-07-03linux: added Sarge-AT91 support (based on original submission kernel)Marcin Juszkiewicz1
2007-06-14linux 2.6.2x: unify and add deploy for u-boot machinesKoen Kooi1
2007-06-13linux 2.6.20, 2.6.21, 2.6.21+2.6.22-rc1: more uImage fixes, don't we love tha...Koen Kooi1
2007-06-13linux 2.6.20, 2.6.21, 2.6.21+2.6.22-rc1: fix install for uImage Koen Kooi1
2007-06-13linux 2.6.20, 2.6.21, 2.6.21+2.6.21+2.6.22-rc1: at91sam9263-ek updatesKoen Kooi1
2007-06-12linux 2.6.21: elaborate support for at91 and avr32Koen Kooi1
2007-06-02linux 2.6.21: atstk1000 needs uImage instead of zImageKoen Kooi1
2007-05-25linux 2.6.21: kb9202 use u-boot so switch to uImageMarcin Juszkiewicz1
2007-05-25linux 2.6.21: add EABI magicKoen Kooi1
2007-05-25linux 2.6.21: added kb9202 supportMarcin Juszkiewicz1
2007-05-07linux: added 2.6.21 for Simpad (progear need refresh of config) - close #2247Bernhard Guillon1