]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging.bbclass: Only clean out the sysroot if we rerun configure, not at setscene...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Jan 2011 20:58:38 +0000 (20:58 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Jan 2011 10:28:19 +0000 (10:28 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass
meta/classes/staging.bbclass

index d7d30c012133f64509d045aae8818de6ed1e72e3..4435abc347dc76e24281e6c680996bdac938805c 100644 (file)
@@ -238,7 +238,6 @@ def sstate_clean(ss, d):
 
     oe.path.remove(d.getVar("STAMP", True) + ".do_" + ss['task'] + "*")
 
-SCENEFUNCS += "sstate_cleanall"
 CLEANFUNCS += "sstate_cleanall"
 
 python sstate_cleanall() {
index 718b2f1f259d2692fb9c7e607a0762648692ed30..a713734c3f636ffa877eb383ba5247c93bde6608 100644 (file)
@@ -65,6 +65,12 @@ SYSROOT_PREPROCESS_FUNCS ?= ""
 SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/"
 SYSROOT_LOCK = "${STAGING_DIR}/staging.lock"
 
+# We clean out any existing sstate from the sysroot if we rerun configure
+python sysroot_cleansstate () {
+     ss = sstate_state_fromvars(d, "populate_sysroot")
+     sstate_clean(ss, d)
+}
+do_configure[prefuncs] += "sysroot_cleansstate"
 
 python do_populate_sysroot () {
     #
@@ -92,7 +98,6 @@ python do_populate_sysroot_setscene () {
 }
 addtask do_populate_sysroot_setscene
 
-
 python () {
     if bb.data.getVar('do_stage', d, True) is not None:
         bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with Poky" % bb.data.getVar("FILE", d, True))