diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-05-05 16:51:53 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-05-05 16:51:53 +0000 |
commit | 991e34d4152c70b22ce67fbf01e182900782a3aa (patch) | |
tree | 6d0c916bcc7fd4429cee0a0f16735b16371a7207 /classes/base.bbclass | |
parent | 410aba75d199a6e2405ef0dd6188507e82ee6afd (diff) |
base.bbclass: Add setscene task, fixing the rebuild task funcionality with recent bitbake versions and improving interaction with packaged staging. WARNING: The result of this commit on existing builds is they will effectively rebuild from scratch.
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r-- | classes/base.bbclass | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 1213ef07fa..141a525ebb 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -473,6 +473,24 @@ python base_do_mrproper() { bb.build.exec_func('do_clean', d) } +SCENEFUNCS += "base_scenefunction" + +python base_do_setscene () { + for f in (bb.data.getVar('SCENEFUNCS', d, 1) or '').split(): + bb.build.exec_func(f, d) + if not os.path.exists(bb.data.getVar('STAMP', d, 1) + ".do_setscene"): + bb.build.make_stamp("do_setscene", d) +} +do_setscene[selfstamp] = "1" +addtask setscene before do_fetch + +python base_scenefunction () { + stamp = bb.data.getVar('STAMP', d, 1) + ".needclean" + if os.path.exists(stamp): + bb.build.exec_func("do_clean", d) +} + + addtask fetch do_fetch[dirs] = "${DL_DIR}" do_fetch[depends] = "shasum-native:do_populate_staging" @@ -701,6 +719,7 @@ python base_eventhandler() { dir = "%s.*" % e.stampPrefix[fn] bb.note("Removing stamps: " + dir) os.system('rm -f '+ dir) + os.system('touch ' + e.stampPrefix[fn] + '.needclean') if not data in e.__dict__: return NotHandled @@ -978,7 +997,7 @@ inherit patch # Move to autotools.bbclass? inherit siteinfo -EXPORT_FUNCTIONS do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_populate_pkgs do_stage do_rebuild do_fetchall +EXPORT_FUNCTIONS do_setscene do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_populate_pkgs do_stage do_rebuild do_fetchall MIRRORS[func] = "0" MIRRORS () { |