1 # This class clean a package on failure, a nice way to keep diskspace usage down and force rebuilds
3 # we want to be an event handler
4 addhandler failure_eventhandler
5 python failure_eventhandler() {
6 from bb import build, event, note, error, data
7 from bb.event import getName
9 if e.data is None or getName(e) == "MsgNote":
13 if name == "PkgFailed":
14 bb.note("Exectuting -c clean on failed build")
15 build.exec_func('do_clean', e.data)