diff options
-rw-r--r-- | classes/rm_work.bbclass | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass index 4efd39c557..97de5e2774 100644 --- a/classes/rm_work.bbclass +++ b/classes/rm_work.bbclass @@ -25,3 +25,23 @@ do_rm_work_all () { } do_rm_work_all[recrdeptask] = "do_rm_work" addtask rm_work_all after do_rm_work + + +addhandler rmwork_stampfixing_eventhandler +python rmwork_stampfixing_eventhandler() { + from bb.event import getName + import os + + if getName(e) == "StampUpdate": + for (fn, task) in e.targets: + if task == 'rm_work_all': + continue + stamp = "%s.do_rm_work" % e.stampPrefix[fn] + if os.path.exists(stamp): + dir = "%s.*" % e.stampPrefix[fn] + bb.note("Removing stamps: " + dir) + os.system('rm -f '+ dir) + + return NotHandled +} + |