summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass22
1 files changed, 20 insertions, 2 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 010b617721..b7459bc996 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -464,6 +464,24 @@ python base_do_mrproper() {
464 bb.build.exec_func('do_clean', d) 464 bb.build.exec_func('do_clean', d)
465} 465}
466 466
467SCENEFUNCS += "base_scenefunction"
468
469python base_do_setscene () {
470 for f in (bb.data.getVar('SCENEFUNCS', d, 1) or '').split():
471 bb.build.exec_func(f, d)
472 if not os.path.exists(bb.data.getVar('STAMP', d, 1) + ".do_setscene"):
473 bb.build.make_stamp("do_setscene", d)
474}
475do_setscene[selfstamp] = "1"
476addtask setscene before do_fetch
477
478python base_scenefunction () {
479 stamp = bb.data.getVar('STAMP', d, 1) + ".needclean"
480 if os.path.exists(stamp):
481 bb.build.exec_func("do_clean", d)
482}
483
484
467addtask fetch 485addtask fetch
468do_fetch[dirs] = "${DL_DIR}" 486do_fetch[dirs] = "${DL_DIR}"
469do_fetch[depends] = "shasum-native:do_populate_staging" 487do_fetch[depends] = "shasum-native:do_populate_staging"
@@ -604,7 +622,6 @@ def oe_unpack_file(file, data, url = None):
604 return ret == 0 622 return ret == 0
605 623
606addtask unpack after do_fetch 624addtask unpack after do_fetch
607do_unpack[cleandirs] = "${WORKDIR}"
608do_unpack[dirs] = "${WORKDIR}" 625do_unpack[dirs] = "${WORKDIR}"
609python base_do_unpack() { 626python base_do_unpack() {
610 import re, os 627 import re, os
@@ -707,6 +724,7 @@ python base_eventhandler() {
707 dir = "%s.*" % e.stampPrefix[fn] 724 dir = "%s.*" % e.stampPrefix[fn]
708 bb.note("Removing stamps: " + dir) 725 bb.note("Removing stamps: " + dir)
709 os.system('rm -f '+ dir) 726 os.system('rm -f '+ dir)
727 os.system('touch ' + e.stampPrefix[fn] + '.needclean')
710 728
711 if not data in e.__dict__: 729 if not data in e.__dict__:
712 return NotHandled 730 return NotHandled
@@ -972,7 +990,7 @@ inherit patch
972# Move to autotools.bbclass? 990# Move to autotools.bbclass?
973inherit siteinfo 991inherit siteinfo
974 992
975EXPORT_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 993EXPORT_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
976 994
977MIRRORS[func] = "0" 995MIRRORS[func] = "0"
978MIRRORS () { 996MIRRORS () {