]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging.bbclass: Add BB_SETSCENE_VERIFY_FUNCTION function
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Nov 2011 14:37:10 +0000 (14:37 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 22 Nov 2011 13:04:31 +0000 (13:04 +0000)
Since we clean out do_populate_sysroot if do_configure runs, don't
allow do_populate_sysroot_setscene functions if we're going to
run do_configure.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/staging.bbclass

index 831840456b65e4cbe8a63ebe816296f834f97f39..259a6611c96e76b81da70c002fbf1b1e8838e7fb 100644 (file)
@@ -73,6 +73,21 @@ python sysroot_cleansstate () {
 }
 do_configure[prefuncs] += "sysroot_cleansstate"
 
+
+BB_SETSCENE_VERIFY_FUNCTION = "sysroot_checkhashes"
+
+def sysroot_checkhashes(covered, tasknames, fnids, fns, d):
+    problems = set()
+    configurefnids = set()
+    for task in xrange(len(tasknames)):
+        if tasknames[task] == "do_configure" and task not in covered:
+            configurefnids.add(fnids[task])
+    for task in covered:
+        if tasknames[task] == "do_populate_sysroot" and fnids[task] in configurefnids:
+            problems.add(task)
+            bb.error("sysroot task found %s" % fns[fnids[task]])
+    return problems
+
 python do_populate_sysroot () {
     #
     # if do_stage exists, we're legacy. In that case run the do_stage,