summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-worker
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-09 13:55:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-25 13:16:24 +0100
commit695998f921b691f196825e9067b6db399d691e53 (patch)
tree29e013e9b3c5046d80974618a3c1e0d841fa1d27 /bitbake/bin/bitbake-worker
parent3673a43c22f8adb98945501786077a77a798fb93 (diff)
downloadpoky-695998f921b691f196825e9067b6db399d691e53.tar.gz
bitbake: cooker: Add FILE_LAYERNAME variable containing the layername for a recipe
There are times when it would be useful for code to know which layer (or collection in old bitbake terms) it is contained within. Add support for FILE_LAYERNAME to be set by bitbake when parsing a recipe so that it is possible to determine this. To do it, we need to pass data from the cooker into the recipe endpoints, since only the top level cooker information knows about the layer structure which makes the patch a bit painful. The idea is that this would make layer overrides possible: OVERRIDES .= ":layer-${FILE_LAYERNAME}" which then opens possibilities like: WARN_QA:append:layer-core = " patch-fuzz" as an example where OE-Core could enable specific QA tests only for that specific layer. (Bitbake rev: 7090a14b0035842112d073acf7f2ed1a01fdeccf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-worker')
-rwxr-xr-xbitbake/bin/bitbake-worker3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index d743ff5105..451e6926bf 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -151,6 +151,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, extraconfigdata, runtask):
151 taskhash = runtask['taskhash'] 151 taskhash = runtask['taskhash']
152 unihash = runtask['unihash'] 152 unihash = runtask['unihash']
153 appends = runtask['appends'] 153 appends = runtask['appends']
154 layername = runtask['layername']
154 taskdepdata = runtask['taskdepdata'] 155 taskdepdata = runtask['taskdepdata']
155 quieterrors = runtask['quieterrors'] 156 quieterrors = runtask['quieterrors']
156 # We need to setup the environment BEFORE the fork, since 157 # We need to setup the environment BEFORE the fork, since
@@ -262,7 +263,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, extraconfigdata, runtask):
262 bb.parse.siggen.set_taskhashes(workerdata["newhashes"]) 263 bb.parse.siggen.set_taskhashes(workerdata["newhashes"])
263 ret = 0 264 ret = 0
264 265
265 the_data = databuilder.parseRecipe(fn, appends) 266 the_data = databuilder.parseRecipe(fn, appends, layername)
266 the_data.setVar('BB_TASKHASH', taskhash) 267 the_data.setVar('BB_TASKHASH', taskhash)
267 the_data.setVar('BB_UNIHASH', unihash) 268 the_data.setVar('BB_UNIHASH', unihash)
268 bb.parse.siggen.setup_datacache_from_datastore(fn, the_data) 269 bb.parse.siggen.setup_datacache_from_datastore(fn, the_data)