[oe-commits] org.oe.dev 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.
rpurdie commit
oe at amethyst.openembedded.net
Mon May 5 16:57:31 UTC 2008
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.
Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: 73fcb901305a5da0ea4157fd569f9d4740a22183
ViewMTN: http://monotone.openembedded.org/revision/info/73fcb901305a5da0ea4157fd569f9d4740a22183
Files:
1
classes/base.bbclass
Diffs:
#
# mt diff -r889825722b52c6f4494f04198ff5b0d19b3c902b -r73fcb901305a5da0ea4157fd569f9d4740a22183
#
#
#
# patch "classes/base.bbclass"
# from [5e061e6d4d77b3580be191bd0bf309b49d146574]
# to [87dd03979cb29f273e7a4b617c08482a5f141bea]
#
============================================================
--- classes/base.bbclass 5e061e6d4d77b3580be191bd0bf309b49d146574
+++ classes/base.bbclass 87dd03979cb29f273e7a4b617c08482a5f141bea
@@ -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 siteinfo
# 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 () {
More information about the Openembedded-commits
mailing list