diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-02-26 17:54:55 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-02-26 17:54:55 +0000 |
commit | b9c6764ba5a7f2d439088f42d7d2b82403f2e2b0 (patch) | |
tree | 506a1ae0beaf74a7d3986c162d73eea54762b2ec | |
parent | 5f4deee606d344af8e8aa7f0b3e07f64e7574b6c (diff) |
rm_work.bbclass: Add event handler to take care of removing stamps when trying to rebuild packages after sources have been removed. Needs bitbake 1.8 svn to have any effect.
-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 +} + |