From: Jose Quaresma <
jose.q...@oss.qualcomm.com>
We need to take into account whether the main layer is disabled when we search
for the oe-init-build-env script.
If for some reason the meta layer is disabled it is because the user did it
explicitly and it is not possible to use the repository since without this
layer we can only use bitbake.
An example where this is necessary is when we use the nodistro as the base
configuration and want to override it with another configuration to use the poky.
Or vice versa.
nodistro.yml
bitbake:
layers:
.: disabled
oe-core:
layers:
meta:
poky.yml
oe-core:
layers:
meta: disabled
poky:
layers:
meta:
meta-poky:
- To build the nodistro the user uses the nodistro.yml which also contains the
remaining defined configuration.
- To use the poky distro the user will use the nodistro.yml:poky.yml which explicitly
disables the layer meta from the oe-core repo in the poky.yml and adds the poky layers.
In this case, with the configuration nodistro.yml:poky.yml, we have two repositories
where the meta layer is present but in one of them it was explicitly turned off so
we must use the script from the repo that has the meta layer active, which in this case
is poky repo.
Signed-off-by: Jose Quaresma <
jose.q...@oss.qualcomm.com>
---
kas/libkas.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kas/libkas.py b/kas/libkas.py
index 5327efb..ff5d33a 100644
--- a/kas/libkas.py
+++ b/kas/libkas.py
@@ -279,6 +279,11 @@ def get_build_environ(build_system):
for script in scripts]
for (repo, script) in permutations:
if os.path.exists(repo.path + '/' + script):
+ if 'meta' not in repo._layers and 'oe-init-build-env' in scripts:
+ logging.warning('The scripts "oe-init-build-env" found on '
+ 'repo "%s" but the "meta" layer is disabled',
repo.name)
+ continue
+
if init_repo:
raise InitBuildEnvError(
'Multiple init scripts found '
--
2.51.0