* [layerindex-web][PATCH] Fix parsing after AVAILABLE_LICENSES change
@ 2020-01-06 0:44 Paul Eggleton
0 siblings, 0 replies; only message in thread
From: Paul Eggleton @ 2020-01-06 0:44 UTC (permalink / raw)
To: yocto
In OE-Core commit 8c9ef587fe499c612a878a1ab42092eb79b334ef an
AVAILABLE_LICENSES variable was added in license.bbclass where its value
is assigned with immediate expansion ( := ) with the result that it
looks in LICENSE_PATH for licenses; in turn LICENSE_PATH refers to
COREBASE. You might assume that COREBASE is always set, and normally it
is (since it's set OE-Core's layer.conf) - but in the layer index
context we do not parse layer.conf until a bit later, so it immediately
fails. The quick way to fix this is just to set our own (correct) value
for COREBASE and then AVAILABLE_LICENSES can be expanded successfully.
You might ask why we don't instead just set BBLAYERS such that we *do*
parse OE-Core's layer.conf - the answer is that that can have other
effects such as BBFILE_COLLECTIONS being set, and at least at the moment
the rest of the code isn't expecting that.
Fixes [YOCTO #13723].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
layerindex/recipeparse.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py
index 162cf62c..35867adb 100644
--- a/layerindex/recipeparse.py
+++ b/layerindex/recipeparse.py
@@ -74,6 +74,9 @@ def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout
# (see findTopdir() in bitbake/lib/bb/cookerdata.py)
os.mkdir(os.path.join(tempdir, 'conf'))
with open(os.path.join(tempdir, 'conf', 'bblayers.conf'), 'w') as f:
+ if not classic:
+ # We need this to avoid problems with AVAILABLE_LICENSES
+ f.write('COREBASE = "%s"\n' % core_repodir)
pass
if logger:
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-06 0:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-06 0:44 [layerindex-web][PATCH] Fix parsing after AVAILABLE_LICENSES change Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.