summaryrefslogtreecommitdiffstats
path: root/meta/classes/externalsrc.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-18 11:30:03 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-20 12:26:25 +0000
commit64bb800c73de011376af98066b1845f73e2355a2 (patch)
treefd9763c0877731754635c49c902b50a1375c1726 /meta/classes/externalsrc.bbclass
parent14471d201b40820f535226f99159b3a7a85df0cd (diff)
downloadpoky-64bb800c73de011376af98066b1845f73e2355a2.tar.gz
externalsrc: Use deltask API
Now we have deltask API, stop poking around bitbake internal variables. (From OE-Core rev: 98637df0c04fd14b506d9eec7da8ec6ae441221b) (From OE-Core rev: 3aa30ca04752c6366a81db6ff99209fa0b46861c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/externalsrc.bbclass')
-rw-r--r--meta/classes/externalsrc.bbclass21
1 files changed, 3 insertions, 18 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index c759289701..53c71cb5f5 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -26,21 +26,6 @@
26 26
27SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch" 27SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
28 28
29def remove_tasks(tasks, deltasks, d):
30 for task in tasks:
31 deps = d.getVarFlag(task, "deps")
32 for preptask in deltasks:
33 if preptask in deps:
34 deps.remove(preptask)
35 d.setVarFlag(task, "deps", deps)
36 # Poking around bitbake internal variables is evil but there appears to be no better way :(
37 tasklist = d.getVar('__BBTASKS') or []
38 for task in deltasks:
39 d.delVarFlag(task, "task")
40 if task in tasklist:
41 tasklist.remove(task)
42 d.setVar('__BBTASKS', tasklist)
43
44python () { 29python () {
45 externalsrc = d.getVar('EXTERNALSRC', True) 30 externalsrc = d.getVar('EXTERNALSRC', True)
46 if externalsrc: 31 if externalsrc:
@@ -53,16 +38,16 @@ python () {
53 d.setVar('SRC_URI', '') 38 d.setVar('SRC_URI', '')
54 39
55 tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys()) 40 tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys())
56 covered = d.getVar("SRCTREECOVEREDTASKS", True).split()
57 41
58 for task in tasks: 42 for task in tasks:
59 if task.endswith("_setscene"): 43 if task.endswith("_setscene"):
60 # sstate is never going to work for external source trees, disable it 44 # sstate is never going to work for external source trees, disable it
61 covered.append(task) 45 bb.build.deltask(task, d)
62 else: 46 else:
63 # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time 47 # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time
64 d.appendVarFlag(task, "lockfiles", "${S}/singletask.lock") 48 d.appendVarFlag(task, "lockfiles", "${S}/singletask.lock")
65 49
66 remove_tasks(tasks, covered, d) 50 for task in covered:
51 bb.build.deltask(task, d)
67} 52}
68 53