diff options
Diffstat (limited to 'classes/srctree.bbclass')
| -rw-r--r-- | classes/srctree.bbclass | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/classes/srctree.bbclass b/classes/srctree.bbclass index dbf8ad2c3f..1a88613a0b 100644 --- a/classes/srctree.bbclass +++ b/classes/srctree.bbclass @@ -26,8 +26,8 @@ def merge_tasks(d): """ merge_tasks performs two operations: 1) removes do_patch and its deps from the build entirely. - 2) merges all of the operations that occur prior to do_populate_staging - into do_populate_staging. + 2) merges all of the operations that occur prior to do_populate_sysroot + into do_populate_sysroot. This is necessary, because of recipe variants (normal, native, cross, sdk). If a bitbake run happens to want to build more than one of @@ -50,7 +50,7 @@ def merge_tasks(d): __gather_taskdeps(task, items) return items - newtask = "do_populate_staging" + newtask = "do_populate_sysroot_post" mergedtasks = gather_taskdeps(newtask) mergedtasks.pop() deltasks = gather_taskdeps("do_patch") @@ -83,17 +83,22 @@ def merge_tasks(d): d.setVarFlag(task, "deps", deps) # Pull cross recipe task deps over - depends = (d.getVarFlag(task, "depends") or "" - for task in mergedtasks[:-1] - if not task in deltasks) - d.setVarFlag("do_populate_staging", "depends", " ".join(depends)) + depends = [] + deptask = [] + for task in mergedtasks[:-1]: + if not task in deltasks: + depends.append(d.getVarFlag(task, "depends") or "") + deptask.append(d.getVarFlag(task, "deptask") or "") + + d.setVarFlag("do_populate_sysroot_post", "depends", " ".join(depends)) + d.setVarFlag("do_populate_sysroot_post", "deptask", " ".join(deptask)) python () { merge_tasks(d) } -# Manually run do_install & all of its deps, then do_stage -python do_populate_staging () { +# Manually run do_install & all of its deps +python do_populate_sysroot_post () { from os.path import exists from bb.build import exec_task, exec_func from bb import note @@ -105,11 +110,11 @@ python do_populate_staging () { if not dep in seen: rec_exec_task(dep, seen) seen.add(task) - #if not exists("%s.%s" % (stamp, task)): - note("%s: executing task %s" % (d.getVar("PF", True), task)) - exec_task(task, d) + if not exists("%s.%s" % (stamp, task)): + note("%s: executing task %s" % (d.getVar("PF", True), task)) + exec_func(task, d) - rec_exec_task("do_install", set()) - exec_func("do_stage", d) + rec_exec_task("do_populate_sysroot", set()) } -do_populate_staging[lockfiles] += "${S}/.lock" +addtask populate_sysroot_post after do_populate_sysroot +do_populate_sysroot_post[lockfiles] += "${S}/.lock" |
