summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
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/lib/bb/runqueue.py
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/lib/bb/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 02f1474540..1eac2da5e8 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2166,6 +2166,7 @@ class RunQueueExecute:
2166 'unihash' : self.rqdata.get_task_unihash(task), 2166 'unihash' : self.rqdata.get_task_unihash(task),
2167 'quieterrors' : True, 2167 'quieterrors' : True,
2168 'appends' : self.cooker.collections[mc].get_file_appends(taskfn), 2168 'appends' : self.cooker.collections[mc].get_file_appends(taskfn),
2169 'layername' : self.cooker.collections[mc].calc_bbfile_priority(taskfn)[2],
2169 'taskdepdata' : self.sq_build_taskdepdata(task), 2170 'taskdepdata' : self.sq_build_taskdepdata(task),
2170 'dry_run' : False, 2171 'dry_run' : False,
2171 'taskdep': taskdep, 2172 'taskdep': taskdep,
@@ -2259,6 +2260,7 @@ class RunQueueExecute:
2259 'unihash' : self.rqdata.get_task_unihash(task), 2260 'unihash' : self.rqdata.get_task_unihash(task),
2260 'quieterrors' : False, 2261 'quieterrors' : False,
2261 'appends' : self.cooker.collections[mc].get_file_appends(taskfn), 2262 'appends' : self.cooker.collections[mc].get_file_appends(taskfn),
2263 'layername' : self.cooker.collections[mc].calc_bbfile_priority(taskfn)[2],
2262 'taskdepdata' : self.build_taskdepdata(task), 2264 'taskdepdata' : self.build_taskdepdata(task),
2263 'dry_run' : self.rqdata.setscene_enforce, 2265 'dry_run' : self.rqdata.setscene_enforce,
2264 'taskdep': taskdep, 2266 'taskdep': taskdep,